LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   gtkmm code. compilation problem (https://www.linuxquestions.org/questions/linux-general-1/gtkmm-code-compilation-problem-4175419373/)

undeadgangster 07-30-2012 09:20 AM

gtkmm code. compilation problem
 
I've been trying to compile some simple gtkmm code on debian squeeze but every time I compile I get the error message #error "Only <glib.h> can be included directly." can someone offer some assistance

the code I'm trying to compile:

#include <gtkmm.h>

int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}

knudfl 07-30-2012 10:02 AM

Assume file name = example_gtkmm.cc

Will compile OK with :

Code:

g++ example_gtkmm.cc `pkg-config --libs --cflags glibmm-2.4 gtkmm-2.4 pangomm-1.4`
.

onebuck 07-31-2012 06:10 AM

Moderator Response
 
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate of http://www.linuxquestions.org/questi...or-4175419235/


All times are GMT -5. The time now is 03:56 AM.