[gecode-users] Copiling with gcc on OpenSuSE 10.0

Vladimír Dusa neachem at volny.cz
Sat Nov 26 13:30:12 CET 2005


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):

//begin of file test.cpp
	#include <iostream>
	#include <cstdlib>
	#include "gecode/minimodel.hh"

	using namespace std;

	int main(int argc, char *argv[]){
		cout << "Hello, world!" << endl;
		return EXIT_SUCCESS;
	}
//end of file test.cpp

Then, when this file is compiled as:
"gcc -L$GPREFIX/lib -lgecodeminimodel -I$GPREFIX/include -I$GPREFIX/include/
gecode test.cpp" I become lot of errors. I had a similar problem with
commonc++ and it was solved by using some tool "ccgnu2-config" which told me
the values for -L and -I options (here I tried -L$GPREFIX/lib
and -I$GPREFIX/....). I mean, that the problem is on my side somewhere here.
It must be only some trifle. (Since my previous email I made "make install"
of gecode.)

Thank you very much

Best regards

Vladimír Duša


>Hi!
>
>> Hello,
>>
>> I have a problem with compiling gecode sources.
>> I am using:
>> System: OpenSuSE 10.0
>> gcc --version: 4.0.2 20050901
>>
>> I installed the gecode:
>> 1) "./compile" (no error)
>> 3) "make" (no error).
>>
>> I copied the file "money.cc" from the directory "examples" to the same
>> directory as the file "minimodel.hh" is. Then I tried to compile this
file
>> using:
>> gcc -L./ -I./ money.cc
>
>In fact, the make you did after ./compile should have compiled all
>examples. You can then run them from the directory where you invoked make,
>like this
>./examples/money
>
>If this doesn't work, please let us know!
>
>Cheers,
>  Guido







More information about the gecode-users mailing list