Re: [gtk+osx] Compiling GTK Helloworld GTK app on MAC
Status: Beta
Brought to you by:
jralls
From: Andy P. <en...@li...> - 2005-03-10 16:42:27
|
John, Thanks for the info. Just to be clear, the goal of this project is to port gtk+ natively to the Mac, by replacing gtk's low level X11 API layer with our own native Carbon API layer. This removes any dependence upon fink, darwinports, or X11, for gtk+ based apps on the Mac. There is further documentation as well as example source code, in the package on the website, on how to compile and use the gtk-osx distribution. Thanks, Andy John Bender wrote: > Hey all, > > This is a down and dirty guide to compiling some of your own custom gtk > apps on your machine. First and foremost you need to have Fink and X11 > installed along with X11 sdk. > The sdk can be found in the xtools developer package. Once you have all > those things downloaded you will want to download and install all the > "gtk+" files you see when you do a "fink list". Once thats complete the > tutorial for compiling gtk apps will tell you to use the following > command to compile your gtk helloworld.c. > > gcc -Wall -g helloworld.c -o helloworld `pkg-config --cflags > gtk+-2.0``pkg-config --libs gtk+-2.0` > > make sure you change it to this > > gcc -Wall -g helloworld.c -o helloworld `pkg-config --cflags > gtk+-2.0``pkg-config --libs gtk+-2.0` -I/sw/lib > > note the difference on the end is -I/sw/lib which is where fink puts the > gtk libs. > Im not totally sure if you need to download a gtk dependent program > using either fink or apt-get but you might have too. I think I did gftp > before I even attempted any of this. In any case I think this should > work for most of you, if you are having trouble email me and I will try > and help you. The most important thing to do is try and use fink to > download and compile a GTK dependent app like gftp and if thats working > then do the gtk+ libs that I talked about and the compile instructions I > wrote up above, those things should pretty much guarantee that you can > compile your own gtk apps and run them with X11 > > John |