GTKmm undefined reference to `Gtk::Main::Main(int&, char**&, bool)' gtkmm-2.4

Hello there,

I am trying to get a C++ program working with Win7, Eclipse, MinGW and gtkmm-2.4. It says there are plenty of undefined references although I think the Eclipse project is configured correctly. I have also read all the threads about this topic but that did not help me yet.

The header files like gtkmm/main.h are included without errors. Still the references to Gtk and Glib classes and functions are not resolved somehow.

This is the main function, where it says `Gtk::Main::Main(int&, char**&, bool)'
http://s1.directupload.net/images/140311/m26jyywf.jpg

Now the project C++ build settings.
Compiler command line pattern:
http://s7.directupload.net/images/140311/yiefbsjz.jpg

C++ Compiler Include paths (output of ´pkg-config gtkmm-2.4 --cflags´ used):
http://s14.directupload.net/images/140311/zwdrspk3.jpg

C++ Compiler Miscellaneous tab with other flags:
http://s14.directupload.net/images/140311/9slb6scy.jpg

MinGW C++ Linker command line pattern:
http://s7.directupload.net/images/140311/htt8ba5y.jpg

MinGW C++ Linker Libraries (output of ´pkg-config gtkmm-2.4 --libs´ used):
http://s1.directupload.net/images/140311/s7ad37br.jpg

MinGW C++ Linker Miscellaneous tab with other flags:
http://s7.directupload.net/images/140311/ot45ryau.jpg

Heres a snippet of the build process console output (containing a full g++ command):
http://pastebin.ca/2653895

This is the full console error output after the build process in Eclipse:
http://pastebin.ca/2653886

Does anyone have a clue why it does not work despite I have included all the directories and libraries?

The errors even come from the gtkmm files inside:
 
C:/gtkmm64/include/gtkmm-2.4/gtkmm/papersize.h:42: undefined reference to `Glib::ustring::ustring(char const*)' 


Many thanks!
Last edited on
its linker error which mean you clearly didny include something, or referenced your class wrong.

you might also try changing #include <gtkmm\main.h> to relative path #include "gtkmm\main.h". Also what is the scope of your class? Is it in namespace? Gtk::Main seems different to Gtk::Main::Main
Topic archived. No new replies allowed.