install GTK ?

I'm trying to compile some application in the Terminal and here is what I get

cd src && make
cd tilem && make
gcc -g -c -Wall main.c `gtk-config --cflags`
/bin/sh: line 1: gtk-config: command not found
main.c:21:20: gtk/gtk.h: No such file or directory
main.c: In function `main':
main.c:44: warning: implicit declaration of function `g threadinit'
main.c:45: warning: implicit declaration of function `gtk_init'
main.c:54: warning: implicit declaration of function `exit'
main.c:59: warning: implicit declaration of function `gtk rc_parsestring'
main.c:68: warning: implicit declaration of function `gdk threadsenter'
main.c:69: warning: implicit declaration of function `gtk_main'
main.c:70: warning: implicit declaration of function `gdk threadsleave'
make[2]: * [main.o] Error 1
make[1]: * [xtilem] Error 2
make: * [compile] Error 2

Do I need to install GTK ? How do I do this ?

Thanks !

Posted on Oct 13, 2005 7:50 AM

Reply
5 replies

Oct 14, 2005 10:40 AM in response to Jef Maheux

Several things going on here...

There are two sets of "gtk libraries" (gtk+ and gtk+2) which are completely different beasts from each other. Which do you need? Given that your compile process invokes "gtk-config" to set compiler flags, you want gtk+; gtk+2 uses a different mechanism to set compiler flags.

There are two different versions of GIMP: 1 and 2, which (at least when installed via fink) use gtk+ and gtk+2 respectively. If you installed just gimp (of whatever version), you probably only have the runtime gtk /gtk2 code installed not the header files you need to compile new things against these libs.

Oct 14, 2005 9:36 PM in response to Jef Maheux

If you look at this page,

http://fink.sourceforge.net/pdb/package.php/gtk+2-shlibs

you will see that the package you need is in the unstable branch of fink. So you can activate it by doing this:

sudo perl -pi.bak -e 's| local/bootstrap | local/bootstrap unstable/main unstable/crypto |g' /sw/etc/fink.conf


(all one line)

followed by

fink selfupdate


fink install gtk+2-shlibs


and if you want to go back to the stable branch, you can just then issue

sudo cp /sw/etc/fink.conf.bak /sw/etc/fink.conf


and Bob's your uncle.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

install GTK ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.