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





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