gtkmm Hello World compile problem



I was able to install the gtk and compile a simple hello world program (as documented here: http://www.gtk.org/tutorial/c39.html)

Since that worked I went ahead and got gtkmm (I'm running ubuntu so I used apt-get install libgtkmm-2.4-dev).  That seemed to go ok, so I typed up a hello world example described here: http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch03.html ).  This is what I get back when I try to build it:

blah$ g++ HelloWorld.cpp `pkg-config gtkmm-2.4 --cflags --libs`
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libgtkmm-2.4.so : undefined reference to `gtk_enumerate_printers'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libgtkmm-2.4.so: undefined reference to `gtk_label_set_line_wrap_mode'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libgtkmm- 2.4.so: undefined reference to `gtk_label_get_line_wrap_mode'
collect2: ld returned 1 exit status

If anyone has encountered this before or might know some areas I should look into I'd greatly appreciate it.  If hello world worked with just plain gtk in c I'm assuming it's an issue with the install of gtkmm - is this a safe assumption?  Thanks.

PS:
If it's any help, here's the output of
`pkg-config gtkmm-2.4 --cflags --libs`:

-I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango- 1.0 -I/usr/local/include/atk-1.0 -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/cairo  -L/usr/local/lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-x11-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 

If any other information would be useful please let me know.



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