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

Jens Vollinga jens.vollinga at googlemail.com
Thu Jul 12 21:21:35 CEST 2012


Hi Robert,

sorry, I can not reproduce your problem. I have no problems compiling 
that example, but I have to say I use g++ 4.7 on a Linux box.

I used your commands (without the -DIN_GINAC), and I used the following:

g++ `pkg-config ginac --libs --cflags` derivative.cpp -o derivative

which is a bit more concise. Maybe you can try that line as well, maybe 
something is wrong with the paths of your installation.

Regards,
Jens


On 11.07.2012 14:54, 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?
> _______________________________________________
> GiNaC-list mailing list
> GiNaC-list at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-list
>




More information about the GiNaC-list mailing list