- a bash-compatible shell
- GNU make
These are available in all standard installations of Linux. On MacOS X, you need to install the Apple developer tools. For Windows, we require the Cygwin environment that provides all necessary tools.
We currently support
- the Microsoft Visual C++ compilers for Windows. The Microsoft Visual C++ 2005 Express Edition is available free of charge from the MSDN web pages.
- the GNU Compiler Collection (gcc) for Windows and Unix flavors such as Linux and MacOS X. The GNU gcc is open source software and available from the GCC home page. It is included in all Linux distributions and the Apple MacOS X developer tools. Gecode requires at least version 3.4 of gcc. We recommend using version 4.0 or higher. Very unfortunately, the parser used in versions of gcc before 3.4 is broken and hence cannot compile Gecode.
- The Intel C++ compiler for Windows and Linux. Please note that this compiler was only tested using the evaluation license available from Intel. If you encounter problems or have suggestions for improvements, please let us know.
configurescript in the toplevel directory.
To setup Gecode for your particular system, you may need to add one or more of the following options to
- When using the Microsoft Visual C++ compiler, add
CC=cl CXX=clto your invocation of
- When using the Intel C++ compiler under Windows, add
CC=icl CXX=iclto your invokation of configure.
- When using the Intel C++ compiler under Linux, add
CC=icc CXX=icpcto your invokation of configure.
- To install Gecode somewhere else than the default
/usr/local, use the
- You can enable and disable the individual modules Gecode consists of using
You can get a list of all supported configuration options by calling
configure with the
./configure CC=cl CXX=cl
To compile only the Gecode library without examples on a Unix machine, use
To compile on a Unix machine using a different than the default
gcc compiler, and install under
./configure --prefix=/opt/gecode CC=gcc-4.0 CXX=g++-4.0
To compile a debug build on Unix, turning on all assertions and not inlining anything, use
To compile on Cygwin, but linking against the Windows libraries instead of the Cygwin libraries, use
./configure CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"
To compile on a system using a different than the default compiler, and a
/bin/sh that is not bash compatible (e.g. a Solaris machine), use
./configure --with-host-os=linux \
CC="gcc-4.0" CXX="g++-4.0" \
You can compile as "universal binary" on a Mac OS machine. Configure with
For building universal binaries on a PowerPC machine, you have to supply the path to the universal SDK (which is the default on Intel based Macs):
CXXUSR. For example, to pass to gcc the additional option "-mtune=i686" the following can be used:
Configuring Gecode in a separate directory is easy. Assume that the sources can be found in directory
$GSOURCEDIR, change to the directory where you want to compile Gecode and call
This will generate all necessary files in the new build directory.
in the toplevel Gecode directory will compile the whole library.
or (when running Windows):
On some platforms, you may need to set environment variables like
LD_LIBRARY_PATH (Linux) or
DYLD_LIBRARY_PATH (Mac OS) to the toplevel compile directory (where the dynamic libraries are placed after compilation).
For more information on example scripts see Example scripts (models).
in the build directory.Gecode version from our subversion repository or if you modified any of the source files, you will have to call
make dependbefore compilation in order to determine the source dependencies.
Dependency management is only needed for recompiling Gecode after changing something. In an unmodified version (or after a
make clean) all files are compiled anyway.
configure. There are two options to specify the type of platform:
Using the first option, you can state that your platform should behave like Linux, Darwin (which is actually BSD), or Windows. This affects mainly the filenames and the tools used to generate shared and static libraries.
The second option says that your compiler can be used very much like the gnu compiler
gcc, the Microsoft compiler
cl, or the Intel compiler
icl. Please let us know of any successfull attempt at compiling Gecode on other platforms.
allcompiles all parts of the library that were enabled during
configure, and the examples if enabled
installinstalls library, headers and examples (if enabled) into the
cleanremoves object files
verycleanremoves object files, libraries, and all files + generated during
distcleanremoves object files, libraries, and all generated files
dependcomputes dependencies between source files
testcompiles the test suite
docgenerates this reference documentation using doxygen
installdocinstalls the documentation
distdoccreates tgz and zip archives of the documentation
distzipcreates a binary distribution as a zip archive
disttgzcreates a binary distribution as a tgz archive