LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 10: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, 11:02 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
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, 07:10 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,473
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:44 PM
Gtkmm sigc++ compilation problems PatrickNew Programming 3 01-21-2008 12:44 PM
gtkmm app compilation error PatrickNew Programming 0 12-07-2007 03:27 PM
gtkmm compilation issue PatrickNew Programming 3 09-27-2007 11:23 PM
GTKMM - Compilation Errors - Can't find files or Directory sixtensixone Programming 3 04-06-2005 11:06 AM


All times are GMT -5. The time now is 12:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration