Problem linking to new version of GTK+



Hi,

I have compiled and installed new version (gtk+-2.6.8) on slackware. I still had the older version 1.2.10 on and so I configured newer version with the --prefix=/opt option. Before installing GTK+ I installed all the required packages with the similar prefix option as their older versions were still on my system. Now I'm having a problem linking to the new version. I pretty much have tried all the tricks -- tried changing /etc/ld/so/conf for inclusion of the new library path and running `ldconfig` to changing the LD_LIBRARY_PATH environment variable, but all this to no avail. Following here are a few more details:

1. pkg-config --modversion gtk+ still shows 1.2.10 and pkg-config --modversion glib also shows the older version 1.2.10. Surprisingly though, the modversion shows newer versions for pango, atk and pkg-config.
2. gtk-config --cflags still includes library files from version 1.2

root slack1:/usr/lib# gtk-config --cflags
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include

3. Here's an example of whats happening when I compile the program:

root slack1:~/rv-disp-images# gcc `gtk-config --cflags` `gtk-config --libs` gtk_example1.c -o gtk_example1
/tmp/ccgJXWOf.o(.text+0x4c): In function `main':
: undefined reference to `gtk_widget_set_size_request'
collect2: ld returned 1 exit status

This clearly shows that its a linking problem as this function is not supported by versions before 2.0. I also noticed that there's only one .so file installed in /opt/lib directory and that is `libgtk-x11-2.0.so.0.600.8` for gtk+. Is this the way it should be? Am I missing other .so files for gtk? What have I done wrong in installing these packages? And, how do I resolve this problem?

I would really appreciate any help with regards to this, as I'm completely out of options (and also very new to GTK).

Thanks much!
Alok

_________________________________________________________________
Post FREE Classifieds. http://www.sulekha.com/classifieds/cllist.aspx?nma=IN&ref=msn Reach out to over a million NRIs.




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