Re: Problems building testgtk



Hi Larry,

Now you mention it, I too came across the problem you're describing when I
built 2.0.6 on Sol8.

At the time I put it down as a bug with the very-old gcc I was using (which
I think was 2.95.2 but with the sun linker) but didn't have time to upgrade
so simply removed the "const" from the definitions (and the headers) and it
built okay after that.

By the way, you may also find problems with gtk_binary_age,
gtk_interface_age and gtk_text_unknown_char_utf8 if I remember rightly.

Surely this is a compiler/toolset problem - const things should be as public
as non-const shouldn't they, or am I missing things?

Richard.

----- Original Message -----
From: "Larry McQueary" <mcqueary attbi com>
To: <gtk-list gnome org>
Sent: Thursday, September 05, 2002 1:15 AM
Subject: Problems building testgtk


> Hi,
>
> I'm compiling gtk+ 2.0.6 on Solaris 8 (sparc) with gcc 3.2 and the Sun
> linker and archiver (/usr/ccs/bin/ld and /usr/ccs/bin/ar, respectively).
>  I am configuring with --disable-static.
>
> I have had some problems building testgtk   Upon linking testgtk, I get
> undefined symbols for the following:
>
> gtk_major_version
> gtk_minor_version
> gtk_micro_version
>
> On closer inspection, it seems these are declared in gtkmain.c as
> "const" and therefore are treated by gcc-3.2 as private to the
> translation unit (gtkmain.c) and can't be exported.
>
> I suppose there are four possible solutions, but I leave it to the folks
> who regularly code this stuff to comment:
>
> 1. Munge the configure script so that it provides some magical flag to
> gcc to make it export these variables (don't even know if this is
> possible, and don't care) if gcc is >= 3.x.  Very Ugly.
>
> 2. Have testgtk.c refer to GTK_MAJOR_VERSION, et al (from gtk.h),
> instead of gtk_major_version, et al. (from gtkmain.c).  I find this ugly
> and somewhat brute force.
>
> 3. Add a function similar to gtk_check_version to gtkmain.c, which will
> return these three values (major, minor, and micro version).  Like it.
>
> All this being said, why hasn't anyone else run into this before?
>
> Larry
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]