# Compiling GTK application on mac



## Luc4 (Jan 15, 2008)

Hi! I have an application I wrote in GTK for Linux. I was wondering if it is possible to compile and run it on my mac as well. I know mac has X11, in fact I run the gimp and openoffice on it, so maybe I can even compile software which use GTK? Should I include in the sources the complete sources of GTK?
Thanks guys!


----------



## nixgeek (Jan 15, 2008)

It will compile so long as you have the necessary libraries that depend on the software you wrote.  Most GNU/Linux distributions already have them either installed or available in their repositories.  You would have to have all of the GTK libraries installed as well.  If you need them installed with dependency tracking and everything, there's either Fink or MacPorts.


----------



## Luc4 (Jan 15, 2008)

Would it be possible to avoid installing anything like macport etc...? I mean, would it be possible to download the sources and ./configure and make? Then I insert my include "path/.../gtk/gtk.h" and stop. I need them only for this project compiled using eclipse, so I would like to insert them in the project directory and stop, without touching my mac configuration too much. I don't know how many things this macport installs.
Thanks for your answer!


----------



## nixgeek (Jan 15, 2008)

Yes, you could do that, but then you would be the one in charge of maintaining the necessary dependencies for each of the libraries.  MacPorts is the same as the Ports system in FreeBSD or Portage in Gentoo Linux, so it's pretty much compiled as you request it if I'm not mistaken and it accounts for any dependencies needed by the requested files.


----------



## Luc4 (Jan 15, 2008)

Thank you very much for the information!


----------



## epfllausanne (May 6, 2009)

Hi All,

I have a Gtk program (and a set of related libraries included) which compiles well and work well on Linux. I have also compiled it for Windows using MinGW as well as Cygwin. It works neatly. Now I want to compile and make it as a neat Mac application version so that Mac users can use it as well. Can some of you help? I don't have full access to a standalone Mac machine and hence seeking some help from some of you. 

The software we have developed is an open source and it is available in public. Loosely, it requires Gtk, Lex/Flex, yacc/bison and GLPK (http://www.gnu.org/software/glpk/). The entire source pack is available here http://xitip.epfl.ch/Xitip.tar.gz 
We will give due credits to all who help to make this successfully compiled onto Mac. At the moment it work using the xterm, but our idea is to get a nice Mac application so that Mac users can seamlessly use it without invoking a terminal. 

And this software is useful to verify inequalities in Information theory. Since a large number of people are using Mac these days, we would like to make this reach them too. http://xitip.epfl.ch/

Thanks in advance for your help/suggestions.

Best regards


----------

