Re: How to use glade_new in gtk-win32?



On Wed, Nov 01, 2006 at 01:32:00PM +0800, LUKE wrote:
> 
> gcc.exe "C:\Dev-Cpp\gtk\gtk2.c" -o "C:\Dev-Cpp\gtk\gtk2.exe"   -g3  -I"C:\Dev-Cpp\include"  -I"C:\Program Files\Common Files\GTK\2.0\lib\gtk-2.0\include"  -I"C:\Program Files\Common Files\GTK\2.0\include\gtk-2.0"  -I"C:\Program Files\Common Files\GTK\2.0\include\atk-1.0"  -I"C:\Program Files\Common Files\GTK\2.0\include\pango-1.0"  -I"C:\Program Files\Common Files\GTK\2.0\include\glib-2.0"  -I"C:\Program Files\Common Files\GTK\2.0\include"  -I"C:\Program Files\Common Files\GTK\2.0\include\cairo"  -I"C:\Program Files\Common Files\GTK\2.0\lib\glib-2.0\include"  -I"C:\Program Files\Common Files\GTK\2.0\include\libglade-2.0"   -L"C:\Dev-Cpp\lib" -lgtk-win32-2.0 -lgdk-win32-2.0 -lgthread-2.0 -lgdi32 -lole32 -luuid -latk-1.0  -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0  -lgmodule-2.0 -lglib-2.0 -lintl -liconv -latk-1.0 -g3 
> 
> D:\DOCUME~1\ADMINI~1.LUK\LOCALS~1\Temp/ccSwcaaa.o: In function `main':
> C:/Dev-Cpp/gtk/gtk2.c:8: undefined reference to `glade_init'
> C:/Dev-Cpp/gtk/gtk2.c:9: undefined reference to `glade_xml_new'
> C:/Dev-Cpp/gtk/gtk2.c:10: undefined reference to `glade_xml_signal_autoconnect'
> C:/Dev-Cpp/gtk/gtk2.c:11: undefined reference to `glade_xml_get_widget'
> collect2: ld returned 1 exit status

You have to link with the libraries you use, particularly
-lglade-2.0 here.  But since you use gcc, I suppose
pkg-config would work for you, and therefore stop guessing
what to put on the gcc command line and use pkg-config.

Yeti


--
Whatever.



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