LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2008, 02:11 PM   #1
cool_riyou
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
Question gtk compilation problem


hi
i've insatlled gtk on my computer but it doesn't compile bcause it can't find gtk/gtk.h!!!
wat can be the cause ?? when i typed pkg-config --modversion gtk+-2.0 it gives me 2.10.11 which means that i've gtk on the pc.
 
Old 02-05-2008, 02:15 PM   #2
weisso5
Member
 
Registered: Oct 2007
Location: New York City
Distribution: Gentoo, FC
Posts: 133

Rep: Reputation: 16
Please provide a bit more information so we can help:

1. Distro
2. More specific GTK installation:


Thanks
 
Old 02-05-2008, 02:15 PM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
Insufficient information provided by OP. What distro are you using? What are you trying to do, build another version of GTK or build something against your existing GTK? Would you be kind enough to post the last 20-30 lines of the failed make so we can see what is really going on?
 
Old 02-06-2008, 03:38 AM   #4
cool_riyou
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
hi
Well i've mandriva linux 2007. Well gtk wasn't installed by default from the cd so i installed it by typing #urpmi libgtk+2.0_0-devel

then i checked if it was correctly intalled by typing pkg-config --modversion gtk+-2.0 and it showed 2.10.11(the installed version of gtk i guess). Does it mean that i've gtk installed correctly??

then i tried to test if the gtk libraries were correctly installed by compiling a program in gtk
i typed :
gcc `pkg-config --libs --cflags gtk+-2.0` test.c -o test

and it printed on the screen:
gcc: pkg-config --libs --cflags gtk+-2.0: Aucun fichier ou répertoire de ce type
test.c:2:21: error: gtk/gtk.h: Aucun fichier ou répertoire de ce type
test.c:4: error: expected ‘)’ before ‘*’ token
test.c: In function ‘main’:
test.c:9: error: ‘GtkWidget’ undeclared (first use in this function)
test.c:9: error: (Each undeclared identifier is reported only once
test.c:9: error: for each function it appears in.)
test.c:9: error: ‘pWindow’ undeclared (first use in this function)
test.c:14: error: ‘GTK_WINDOW_TOPLEVEL’ undeclared (first use in this function)
test.c:16: error: ‘GTK_WIN_POS_CENTER’ undeclared (first use in this function)
test.c:23: error: ‘OnDestroy’ undeclared (first use in this function)
test.c: At top level:
test.c:33: error: expected ‘)’ before ‘*’ token
test.c:37:2: warning: no newline at end of file
(i've installed linux in french)
so i think that it doesn't know where to find the gtk libraries??Can someone help please!
 
Old 02-11-2008, 01:14 PM   #5
cool_riyou
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Talking it works

the only reason why it didn't work was that the quotes were not correct!! used ` instead of ' lol
thms anyway
 
Old 02-11-2008, 02:15 PM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
Yeah, it's a good thing they're doing away with those ` in newer bash versions.
 
  


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
GTK+-2.8.17 Compilation problem:undefined reference to `g_intern_static_string' zakariya Linux - Software 1 06-26-2006 09:46 AM
problem with GTK program compilation. pratsadhu Programming 2 02-20-2006 10:52 AM
GTK compilation. shendeswanand Programming 4 01-29-2006 11:48 AM
gtk+ compilation problem maciekish Linux - Software 3 01-11-2005 07:03 AM
Compilation problem with gtk+-2.4.0 Kanaflloric Linux - Software 2 06-17-2004 10:43 PM


All times are GMT -5. The time now is 05:21 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