LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-23-2008, 06:21 AM   #1
mazouz_n
LQ Newbie
 
Registered: Jan 2008
Location: Moscow
Distribution: fedora 8 64 bits
Posts: 23

Rep: Reputation: 15
Trouble libraries gtkmm -glibmm-2.4


Hi there
After installing libsigc++-devel.x86_64 and gtkmm24-docs packages, I get this error:

Package glibmm-2.4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glibmm-2.4.pc'
to the PKG_CONFIG_PATH environment variable
Package 'glibmm-2.4', required by 'gtkmm', not found

My code is :

#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}

cmpiled by :
g++ simple.cc -o simple ‘pkg-config gtkmm-2.4 --cflags --libs‘

What's wrong?
How can I know where all these libraies are installed ?
How to modifiy PKG_CONFIG_PATH environment variable?
 
Old 07-23-2008, 06:39 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Usually you don't have to manually add the pkgconfig entries: the package manager should do that automatically if the package to be installed contains the .pc file. The pkgconfig files are usually in the -devel packages. Maybe you miss the glibmm24-devel package.
 
Old 07-23-2008, 06:55 AM   #3
mazouz_n
LQ Newbie
 
Registered: Jan 2008
Location: Moscow
Distribution: fedora 8 64 bits
Posts: 23

Original Poster
Rep: Reputation: 15
I've installed the glibmm24-devel.x86_64 package and now I've the next error:

Package sigc++-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sigc++-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'sigc++-2.0', required by 'GLibmm', not found
simple.cc:1:19: error: gtkmm.h: No such file or directory
simple.cc: In function ‘int main(int, char**)’:
simple.cc:4: error: ‘Gtk’ has not been declared
simple.cc:4: error: expected `;' before ‘kit’
simple.cc:5: error: ‘Gtk’ has not been declared
simple.cc:5: error: expected `;' before ‘window’
simple.cc:6: error: ‘Gtk’ has not been declared
simple.cc:6: error: ‘window’ was not declared in this scope
 
Old 07-23-2008, 06:57 AM   #4
mazouz_n
LQ Newbie
 
Registered: Jan 2008
Location: Moscow
Distribution: fedora 8 64 bits
Posts: 23

Original Poster
Rep: Reputation: 15
Also I have only GTK+2.0 installed, maybe this can cause a problem ?
 
Old 07-23-2008, 08:08 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You have to install libsigc++20 and libsigc++20-devel. What linux distribution are you running on? On a Fedora 9 system I have libsigc++20 installed, which is version 2.2.2, but the package libsigc++ is also available, which is version 1.2.7. Maybe you've installed the old version only.

PS - It would be very useful if you update your LQ profile including your(s) distribution(s). It will appear at the left of each post - under your nickname - and it will be useful to get quick and appropriate answers to your questions.
 
Old 07-23-2008, 08:28 AM   #6
mazouz_n
LQ Newbie
 
Registered: Jan 2008
Location: Moscow
Distribution: fedora 8 64 bits
Posts: 23

Original Poster
Rep: Reputation: 15
Im woking under Feora 8 64 bits

version of libsigc++20 is 2.0.18
 
Old 07-23-2008, 09:03 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Здравствуйте. Are you sure you've installed the right devel package? In your first post you mentioned libsigc++-devel.x86_64, not libsigc++20-devel.x86_64 which would be the correct one, since it provides sigc++-2.0.pc.
 
Old 07-23-2008, 09:51 AM   #8
mazouz_n
LQ Newbie
 
Registered: Jan 2008
Location: Moscow
Distribution: fedora 8 64 bits
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for your help!
Now It works!
I was so tired and I didn't see that I've installed the wrong package.
 
Old 07-23-2008, 09:54 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You're welcome!
 
  


Reply


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
Help.....Trouble with learning libraries and automake lgavitt Programming 1 10-14-2006 08:24 PM
Having trouble using the gtk libraries. debiant Programming 1 09-06-2006 05:53 AM
glibmm-2.4.0 paul62 Linux - Software 0 10-04-2004 12:22 AM
trouble finding libraries required for apache 2.0.50 manicajk Linux - Software 4 08-16-2004 06:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration