[gecode-users] An error in the linking of an example
Guido Tack
tack at gecode.org
Fri Jan 15 17:14:36 CET 2010
Hi,
you also have to link -lgecodedriver. We should probably mention that in the section about the driver model in "Modeling with Gecode".
Cheers,
Guido
Claudio Cesar de Sá wrote:
> Hi
>
>
> I just finish to install the gecode, last version in a linux machine.
> I add this line in .bashrc
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
> for the right acess in the Gecode lib.
>
> In the compilation phase with a example:
> g++ -I/usr/local/include -c money.cpp
> runs fine.
>
> However in the linkedition:
> claudio at goedel:~/principal/gecode-3.2.2/examples$ g++ -o money_exe -L/usr/local/lib money.o \
> > -lgecodeint -lgecodesearch -lgecodekernel -lgecodesupport
>
> The errors appears, please; below:
>
> money.o: In function `main':
> money.cpp:(.text+0x8a): undefined reference to `Gecode::Options::Options(char const*)'
> money.cpp:(.text+0x13d): undefined reference to `Gecode::BaseOptions::parse(int&, char**)'
> ................................
> ................................
> money.o:(.rodata._ZTVN6Gecode7OptionsE[vtable for Gecode::Options]+0x8): undefined reference to `Gecode::BaseOptions::help()'
> money.o:(.rodata._ZTIN6Gecode7OptionsE[typeinfo for Gecode::Options]+0x8): undefined reference to `typeinfo for Gecode::BaseOptions'
> collect2: ld returned 1 exit status
>
>
> As I am not a C++ expert, somone could help me?
>
>
> The enviroment variables are:
> LD_LIBRARY_PATH=:/usr/local/lib
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
>
> Thanks in advance:::
>
>
> claudio cesar
>
>
>
> (
> ))
> |""|-.
> |__|-'
>
>
> **********************************************************************
> Skype: claudio_cesar_sa
>
> Meus links:
>
> http://www.colmeia.udesc.br
> http://www.joinville.udesc.br/coca
> http://www.joinville.udesc.br/maratona
> Blog: http://claudiocesar.wordpress.com/
> ***********************************************************************
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20100115/8f2d4358/attachment.htm>
More information about the users
mailing list