LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 01-24-2004, 11:46 PM   #1
radiohead_rocks
LQ Newbie
 
Registered: Jan 2004
Distribution: SuSE Linux 9.0
Posts: 13

Rep: Reputation: 0
Question GTK+ 2.0 / pkg-config / gcc


Hi,

First, I'm German, therefore excuse my English. Second, I know C++ but I don't know a lot about compiling code on Linux.

My distribution is SuSE Linux 9.0.

My problem: Whenever I compile anything it says that the libraries needed are missing and that I might wanna think about pointing my PKG_CONFIG_PATH to the right folder.

I assume that whenever I compile something, the compiler checks the PKG_CONFIG_PATH which contains several .pc files. These indicate where to find the libraries for the program.

Well, here's an example. I tried to compile the Window-Example from the GTK Tutorial on the gtk website. I compiled it with
gcc window.c -o window `pkg-config --cflags --libs gtk+-2.0`

The output was:
=========================================================
window.c:1:17: gtk.h: No such file or directory
window.c: In function `main':
window.c:5: error: `GtkWidget' undeclared (first use in this function)
... the rest are errors becuase it doesn't have the library.
=========================================================

But my PKG_CONFIG_PATH variable is set to the right path. Is it possible that the .pc file doesn't have the right paths configured?

Thanks for any help

A Radiohead Fan
 
Old 01-25-2004, 07:48 AM   #2
misfit-x
Member
 
Registered: Jan 2004
Location: NY
Distribution: RH9
Posts: 38

Rep: Reputation: 15
First:

locate gtk+-2.0.pc

Whatever path it comes up with, put it in the next line instead of the "[PATH]":

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:[PATH]

Here's an example (though do not copy the path as it might be different on your system):

# locate gtk+-2.0.pc
/usr/lib/pkgconfig/gtk+-2.0.pc
# export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/gtk+-2.0.pc

Note that you might even see two of the *.pc files if you installed a newer version of gtk+ in another directory and kept the old installation as well. Always use the newer version. If you just see on *.pc file, then use that one.

Last edited by misfit-x; 01-25-2004 at 07:50 AM.
 
Old 01-25-2004, 07:52 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
you are mixing libraries. I've said this more and more recently so here goes again

Gtk is NOT Gtk2

gtk.h is the header file for gtk, gtk2.h is the header file for gtk2. therefore your code clearly is Gtk, and NOT Gtk2, in whcih case you need to obtain the compilation flags from gtk-config (from the gtk-devel package, not pkg-config.

and .. Radiohead? pah.. just plagarists....

Last edited by acid_kewpie; 01-25-2004 at 08:09 AM.
 
Old 01-25-2004, 04:28 PM   #4
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
Quote:
Originally posted by acid_kewpie
and .. Radiohead? pah.. just plagarists....
Acid, you bastard! DIE!!!


 
Old 01-25-2004, 09:47 PM   #5
radiohead_rocks
LQ Newbie
 
Registered: Jan 2004
Distribution: SuSE Linux 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
OK, thanks for everybody who helped. I solved the problem by installing some gnome development packages.

Radiohead is the best band ever, next to DMB, Weezer and The Who!
eof();
 
Old 01-25-2004, 10:05 PM   #6
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
And Muse
 
Old 01-26-2004, 02:08 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
ahahahahahahahah

you guys slay me, i could have guessed you'd be a muse fan too.....

http://www.southern.com

go find the bands they rip off that you've just never heard of...
 
Old 01-26-2004, 09:16 AM   #8
radiohead_rocks
LQ Newbie
 
Registered: Jan 2004
Distribution: SuSE Linux 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
What do they plagiarise (is that the way you spell it?), lyrics or the music or what? You're right, I've never heard of any of the bands at that label...
 
Old 01-26-2004, 09:23 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
you haven't.. but radiohead have.... makes it seem like what they play is original huh?
 
Old 01-26-2004, 03:47 PM   #10
radiohead_rocks
LQ Newbie
 
Registered: Jan 2004
Distribution: SuSE Linux 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
Did anybody come to that conclusion already or is that your own opinion?
 
Old 01-26-2004, 03:51 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
ahh just listen to aphex twin, mogwai or any other number of bands and you can find every single note on radioheads last 3 albums...
 
Old 01-26-2004, 03:55 PM   #12
radiohead_rocks
LQ Newbie
 
Registered: Jan 2004
Distribution: SuSE Linux 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
but possibly they only sound the same... just because they have the same melody it doesn't mean that they plagiarize...
 
Old 01-26-2004, 03:58 PM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
not necessarily no, it just drives me mad that simply because 95% of radiohead fans have never heard real postrock music they worship radiohead as something amazingly original, when they are just so far from it...
 
Old 01-26-2004, 04:12 PM   #14
radiohead_rocks
LQ Newbie
 
Registered: Jan 2004
Distribution: SuSE Linux 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
Are you saying that they are simply succesful because they're mainstream? I don't have a problem listening to them just because of that. Pretty much every band that I like, I started liking because some friend of mine loves it and told me how great that kind of music is. Therefore, the reason that I don't know the bands you're talking about is because nobody I know listens to them (or told me about them). That doesn't mean that they are bad but they are obviously not too popular. Just because Radiohead became a mainstream band, that doesn't mean that everybody who actually enjoys music instead of watching the top 20 charts everyday should stop listening to them.
 
Old 01-26-2004, 04:14 PM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
hell no, nothing wrong with being mainstream, it's the fake credibility they are given by fans who have no idea there is vast amounts of similar (better) music out there...
 
  


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
Compile issues related to GTK, pkg-config Snivek Slackware 7 11-01-2005 10:28 AM
pkg-config gtk+-2.0 sunil21 Linux - Software 1 10-05-2004 02:25 PM
Installing Glib, ATK, GTK, Pkg Config, and Pango! LinuZ Linux - Newbie 9 10-26-2003 02:58 PM
pkg-config TraCe66 Linux - Newbie 1 07-01-2003 02:56 PM
pkg-config Keebler Linux - Software 2 04-30-2003 02:10 PM


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

Main Menu
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