Re: [gtkmm] please help me compile helloworld.cc



> [ccosse fermi src]$ make
> g++ -DPACKAGE=\"hello\" -DVERSION=\"1.0\"  -I. -I.  -I/usr/include 
> -I/usr/lib/gtkmm/include/ -I/usr/include/gtk-1.2 
> -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include 
> -I/usr/include/sigc++-1.0     -c helloworld.cc
> g++    -o hello  helloworld.o  -rdynamic -L/usr/lib -L/usr/X11R6/lib 
> -L/usr/lib -lgtkmm -lgdkmm -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext 
> -lX11 -lm -L/usr/lib -lsigc -lpthread

It seems like your compiler tries to include glib-2.0, gtk-1.2 and sigc++-1.0...

Looks like you have a problem with your Gtk+ installation. Do you want to build for gtk-1.2 or gtk2? 

Can you build a plain gtk+ program?

/Daniel

> helloworld.o: In function `destroy_handler(void)':
> helloworld.o(.text+0xa): undefined reference to `Gtk::Main::quit'
> helloworld.o: In function `HelloWorld::HelloWorld(int)':
> helloworld.o(.text+0x54): undefined reference to 
> `SigC::ObjectScoped::ObjectScoped(void)'
> helloworld.o(.text+0x80): undefined reference to 
> `Gtk::Window::Window(int, GtkWindowType)'
> <and a bunch more...>
> 
> --------------------------------------------------------------------------------------------------------------------------------------
> 
> More info:
> I fought installing from src on Mandrake 8.2 for 2 days, but couldn't 
> get all pkgs to work together, then
> upgraded just the gtkmm pkg from Mandrake9.0 RC2, which installed the 
> libsigc++ and libgtkmm
> for me. (little did i know could do that way). So, that's where i'm at 
> -- the install went fine from the
> 9.0 cdrom and when i point to -L/usr/lib (which is where libsigc and 
> libgtkmm are) i get the above errors. Anyone
> know what i need to do? Thanks v. much,
> Charlie
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 



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