Re: Problem linking to new version of GTK+



From: Jean Bréfort <jean brefort normalesup org>
To: alok nagdev <aloknag hotmail com>
CC: gtk-list gnome org

> 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?

Compile with:
gcc `pkg-config --cflags --libs gtk+-2.0` gtl_example1.c -o gtk_example1


Thanks a lot Jean!!

_________________________________________________________________
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]