[gecode-users] An error in the linking of an example

Christian Schulte cschulte at kth.se
Mon Jan 18 11:08:15 CET 2010


Hi, I just added tips about how to link when you use Gist or the commandline
driver to Modeling with Gecode.

 

Christian

 

--

Christian Schulte, www.ict.kth.se/~cschulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Guido Tack
Sent: Friday, January 15, 2010 5:15 PM
To: Claudio Cesar de Sá
Cc: users at gecode.org
Subject: Re: [gecode-users] An error in the linking of an example

 

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.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/20100118/9d7c71a3/attachment.htm>


More information about the users mailing list