RE: [gtk-list] Re: problems compiling simple stuff




On 29-Apr-98 Nathan Froyd wrote:
> sar@on134th.com wrote:
>> /tmp/cca036471.o: In function `main':
>> /tmp/cca036471.o(.text+0xf): undefined reference to `gtk_init'
>> /tmp/cca036471.o(.text+0x19): undefined reference to `gtk_window_new'
>> /tmp/cca036471.o(.text+0x2a): undefined reference to `gtk_widget_show'
>> /tmp/cca036471.o(.text+0x32): undefined reference to `gtk_main'
>> make: *** [window] Error 1
> 
> Sounds like you need to add -lgtk -lgdk -lglib -L/location/of/gtk to the
> command line.
> 
> Nathan

Well, I tried
gcc -lgtk -lgdk -lglib -L/usr/local/include/gtk window.c
and -L/usr/local/lib, -L/usr/local/lib/glib/include and a few others, but none
seemed to work, all of them dumped a ton of:
/usr/local/lib/libgdk.so: undefined reference to `XCreatePixmap'
/usr/local/lib/libgdk.so: undefined reference to `XUnmapWindow'
/usr/local/lib/libgdk.so: undefined reference to `XSetFillStyle'
/usr/local/lib/libgdk.so: undefined reference to `XCreateGC'
/usr/local/lib/libgdk.so: undefined reference to `XOpenDisplay'

and a lot for gtk, and glib also...
any other ideas? or am I doing it wrong?



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