[gecode-users] compiling problem examples
tack at ps.uni-sb.de
Tue Aug 12 17:18:28 CEST 2008
Andrea Rendl wrote:
> I can execute the problems in the examples directory but cannot
> compile their source code (on Linux): g++ cannot find included header
> files, such as examples/support.hh.
> Both $LD_LIBRARY_PATH and $LIBRARY_PATH include the root directory of
> Gecode (where the .so files and the examples/ directory are) and the
> current directory, which I thought would be sufficient for compiling
> the examples. Is there anything else I need to do?
You not only need the library paths, but also the proper include paths
to find the header files. You can compile the examples using the
Makefile we supply. For this, you have to be in the gecode root
directory (i.e. the directory above the examples directory), and you
can just type e.g. make examples/queens. If you want to compile an
example by hand, just use the same command line arguments for gcc as
in our Makefile (in particular, make sure that the Gecode headers as
well as the Gecode root directory, i.e., examples/.., is mentioned in
an -I argument).
More information about the gecode-users