LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 07-30-2012, 09:20 AM   #1
undeadgangster
LQ Newbie
 
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled
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;
}
 
Old 07-30-2012, 10:02 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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`
.
 
Old 07-31-2012, 06:10 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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/
 
  


Closed Thread

Tags
compile error, glib, gtkmm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation problem in c++ template code :( lali.p Programming 2 10-13-2008 06:44 PM
Gtkmm sigc++ compilation problems PatrickNew Programming 3 01-21-2008 11:44 AM
gtkmm app compilation error PatrickNew Programming 0 12-07-2007 02:27 PM
gtkmm compilation issue PatrickNew Programming 3 09-27-2007 10:23 PM
GTKMM - Compilation Errors - Can't find files or Directory sixtensixone Programming 3 04-06-2005 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration