Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-05-2005, 02:48 PM   #1
LQ Newbie
Registered: Apr 2005
Location: Rio de Janeiro
Distribution: Fedora 3
Posts: 13

Rep: Reputation: 0
GTKMM - Compilation Errors - Can't find files or Directory


Please, I`m novice in Linux programmin. I've been started with gtkmm (to build graphical interface) in C++. I have this initial program:

#include <gtkmm.h>

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

I've got this sample from the gtkmm book which comes with gtkmm software download.

Well, to compile this: g++ -o gtkteste 'pkg-config gtkmm-2.4 --cflags --libs', and I've got this errors:

g++: pkg-config gtkmm-2.4 --cflags --libs: Cannot find this file or directory
gtkteste.cpp:1:19: error: gtkmm.h: Cannot find this file or directory
gtkteste.cpp: In function ‘int main(int, char**)’:

I believe that the first problem is the one, so I did this in the prompt
pkg-config gtkmm-2.4 --cflags --libs and I`ve got:

-DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gtk-2.0 -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/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/atk-1.0 -I/usr/local/include/gtkmm-2.4 -I/usr/local/lib/gtkmm-2.4/include -I/usr/local/include/gdkmm-2.4 -I/usr/local/lib/gdkmm-2.4/include -I/usr/local/include/pangomm-1.4 -I/usr/local/include/atkmm-1.6 -L/usr/local/lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-x11-2.0 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

This show us that atk, gtkmm, pango, etc is installed. So, why g++ can't find this libraries???

Somebody could Help me in it?

Best Regards
Old 04-05-2005, 02:53 PM   #2
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
in your pkg-config command, use "`" <-- the one on the tilde key next to the number one, NOT ' an apostrophe. so it should look like this:

`pkg-config gtkmm-2.4 --cflags --libs`


'pkg-config gtkmm-2.4 --cflags --libs'
Old 04-05-2005, 02:55 PM   #3
Registered: Jan 2004
Posts: 105

Rep: Reputation: 15
Check those include paths for gtkmm.h. It may be you need to add something that is not in g++ include path. This may fix your problem . Perhaps gtkmm.h is within another directory of those paths?
Old 04-06-2005, 10:06 AM   #4
LQ Newbie
Registered: Apr 2005
Location: Rio de Janeiro
Distribution: Fedora 3
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks, that's OK now on the command line.


The problem was : "`" <-- the one on the tilde key next to the number one. That`s it. Incredible!!! Thanks a lot to ROCK and jwstric2.

Now I get the compilation on the command line, as I`ve working with Eclipse (with cdt plug in) I`ll try to set those configurations tab whit the needs of gcc. I just don`t now how to say to Eclipse those needs of "`". But if I couldn't I'll let you know about..

Thanks a lot for your comprehension.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Bash, Find script files in a directory or subdirectories within... ray5_83 Programming 4 10-10-2008 07:42 PM
C++ compilation errors ??? glevine Programming 1 07-16-2004 03:15 PM
Compilation Errors ! vipinsharma Programming 0 06-01-2004 02:24 AM
/usr/bin/find :No such file or Directory errors while trying to compile kernel. Zero-0-Effect Linux From Scratch 2 05-29-2004 03:46 PM
Find string pattern in directory of text files magnum818 Linux - Newbie 2 10-15-2003 08:19 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:08 AM.

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