[gecode-users] Compiling Gecode examples under MAC OS X 10.3.4

Guido Tack tack at ps.uni-sb.de
Wed Oct 31 21:51:18 CET 2007


Hi Mauricio.

Mauricio Toro wrote:

> I have tried, with no success, to compile the GECODE examples under  
> MAC OS X 10.3.4 for ppc
> using g++ 3.3.

We don't support gcc prior to 3.4 any more, and I'm currently not sure  
that 3.4 still works (4.0 or better is recommended).

> I would like to know how the compilation process is achieved? How  
> the makefile is done?
> Do you have any examples about compiling the Gecode examples? It  
> does not matter
> whether they are developed in a different MAC OS version or Linux.
>
> I tried to compile the knights examples this way:
>
> g++ -o examples/knights examples/knights.o examples/support.o  
> examples/timer.o  -L. -I. -I. -I. -fPIC -Wall -ggdb -O3 -fno-strict- 
> aliasing -finline-limit=3000 -ffast-math  -fPIC -Wall -ggdb -O3 -fno- 
> strict-aliasing -finline-limit=3000  -ffast-math   -lgecodeminimodel  
> -lgecodeset -lgecodeint -lgecodesearch -lgecodekernel
>
> But I do not know how to generate the .o files required.

If you use the supplied Makefile, you can just follow the compilation  
instructions:
http://www.gecode.org/gecode-doc-latest/PageComp.html

For compiling individual examples, just run
make examples/knight

> By the way, I heard that gcc 3.3 does not work well with GECODE, gcc  
> 3.4 is ok ?
> gcc > 4 does not work with mac OS < 10.3.5

Oh, I didn't know that.  I guess it should be possible to install gcc  
from sources.  Unfortunately, we cannot support earlier versions of  
gcc, as we heavily rely on several C++ features that older versions  
just don't provide (or at least not correctly).

Cheers,
	Guido





More information about the gecode-users mailing list