Trouble compiling gtk+2.0 app.

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
Danny
Level 1
Level 1
Posts: 5
Joined: Sun Mar 16, 2008 3:46 pm

Trouble compiling gtk+2.0 app.

Post by Danny » Wed Apr 16, 2008 9:28 pm

Hi,
I'm trying to compile the GTK example program (ie. Hello world).
The library file and header files are there(/usr/lib;/usr/include), looks like gcc can't find them.
I'm not to sure about pkg-config? I'm thinking some environmental variable of some kind.


HERE'S WHAT I GET OUT:
gcc: pkg-config --cflags --libs gtk+-2.0: No such file or directory
base.c:1:21: error: gtk/gtk.h: No such file or directory

AND A BUNCH OF STUFF RELATED TO THE MISSING HEADER FILE

I've written some programs for Windows using C++(w/MFC) and some VBS stuff. I'm anxious to
try out programming in Linux!

-Danny^

Husse
Level 23
Level 23
Posts: 18703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Trouble compiling gtk+2.0 app.

Post by Husse » Fri Apr 18, 2008 6:41 am

Have you installed build essentials?
http://www.linuxmint.com/forum/viewtopi ... =90&t=9234
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

Danny
Level 1
Level 1
Posts: 5
Joined: Sun Mar 16, 2008 3:46 pm

Re: Trouble compiling gtk+2.0 app.

Post by Danny » Sat Apr 19, 2008 10:50 pm

Hi,
I found out that it makes a difference what type of quote you use ' or ` in the gcc command line.
Works great when you have the right one. Any advice on an IDE to use ?

thanks,

Danny

Post Reply

Return to “Software & Applications”