[GiNaC-list] linking error with ginac example program derivative.cpp

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Tue Jul 17 06:01:39 CEST 2012


Hello,

On Wed, Jul 11, 2012 at 10:54:24PM +1000, Robert Durkacz wrote:
> I am just starting with ginac but unable to build the derivative.cpp
> program from doc/examples/ in ginac-1.6.2 Others of the examples
> that I tried were built successfully, eg compile1.cpp and compile3.exe
> 
> I am using these versions of ginac and cln:
>     cln-1.3.2
>     ginac-1.6.2
> These libraries were built without problems as per INSTALL instructions.
> 
> compiler (gcc --version):
>     gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
> 
> platform (uname -a):
>     CYGWIN_NT-5.1 dell 1.7.15(0.260/5/3) 2012-05-09 10:25 i686 Cygwin
> 
> command line of compile and link steps:
>     g++ -c -Wall -g -I.. -I../ginac -DIN_GINAC  -o gcc/derivative.o
> derivative.cpp
>     g++ -o derivative gcc/derivative.o ../ginac/.libs/libginac.a
> /usr/local/lib/libcln.a -ldl
>     ../ginac/.libs/libginac.a(parser.o): In function
> `_ZNSt16invalid_argumentD1Ev':
>     /home/Owner/technical/ginac-1.6.2/ginac/parser/parser.h:46:
> multiple definition of `GiNaC::container<std::list>::info(unsigned
> int) const'
>     ../ginac/.libs/libginac.a(lst.o):/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/list.tcc:(.text+0x0):
> first defined here
>     collect2: ld returned 1 exit status
> It is beyond my current abilities to sort out this problem. Could
> someone tell me what is going wrong?

This is a bug in GiNaC. It has been fixed in git (commit e5eeee53d814,
` [bugfix] Always #include <lst.h> before using lst. Fixes build error on MinGW.').
Could you please verify if the fix works for you?

Best regards,
	Alexei



More information about the GiNaC-list mailing list