[gecode-users] Copiling with gcc on OpenSuSE 10.0

tack at ps.uni-sb.de tack at ps.uni-sb.de
Sat Nov 26 15:07:26 CET 2005


Hi.

> Hello,
>
> Maybe I have explained my problem not good. I would like to use gecode for
> solving my problems. If I try to include some gecode header file (e.g.
> #include "minimodel.hh"), I become similar errors as in previous email. I
> used the money.cc as an example. If I make an "empty" cpp file (let's say
> test.cpp):

Sorry, I should have read your first mail more carefully. I think there
are two problems with the way you try to compile your example: you use
gcc, which doesn't like .cc as input file name, and you don't link against
the gecode library.

The easiest way to try your own examples is to copy them into the examples
folder. Assuming your example is called myexample.cc, just do
make examples/myexample
in the Gecode main directory. This will use our Makefile rules to build
your example.
If this works, you can look at the g++ invocation that built your example
and use similar options for building your stuff in other directories.

After installation, you should be able to use the options you saw when
invoking make example/myexample, but add -I<prefix>/include
-L<prefix>/lib.

Hope this helps,
   Guido







More information about the gecode-users mailing list