[GiNaC-list] compiler compatibility?

Chris Bouchard cbouchrd at uiuc.edu
Thu Apr 24 15:45:14 CEST 2008

GiNaC list, 

I'm having, what I think are, problems linking to GiNaC's precompiled libraries.  I'm using gcc 3.4.6, and according to the gcc msg board I will likely be unsuccessful linking to any library compiled with a different version of gcc.  I haven't noticed mention of the compiler version used to build GiNaC's libraries in the GiNaC documentation and was wondering if you had this information readily available? 

Does this explanation sound legitimate to you?  Seems to me that if this were the case there'd be widespread problems using gcc... 

Here's what I'm doing: 

c++ code, ginactest.cpp (ex. from GiNaC tutorial) 
#include <iostream> 
#include "ginac.h" 
using namespace std; 
using namespace GiNaC; 
int main() { 
symbol x("x"), y("y"); 
ex poly; 
for (int i=0; i<3; ++i) 
  poly += factorial(i+16)*pow(x,i)*pow(y,2-i); 
cout << poly << endl; 
return 0; 

Invocation of g++ 
./g++ ginactest.cpp -o ginactest.exe /usr/lib/libgslcblas.so.0.0.0 -I/home/theorist/cbouchrd/GiNaC/ginac -L/home/theorist/cbouchrd/local/lib -lcln -lginac 

Error messages 
/tmp/ccojEpA1.o(.gnu.linkonce.t._ZN5GiNaC5powerC1ERKNS_2exES3_+0xa): In function `GiNaC::power::power(GiNaC::ex const&, GiNaC::ex const&)': 
: undefined reference to `GiNaC::power::tinfo_static' 
/tmp/ccojEpA1.o(.gnu.linkonce.r._ZTVN5GiNaC9containerISt6vectorEE+0x6c): undefined reference to `GiNaC::basic::has(GiNaC::ex const&, unsigned int) const' 
/tmp/ccojEpA1.o(.gnu.linkonce.r._ZTVN5GiNaC9containerISt6vectorEE+0x84): undefined reference to `GiNaC::basic::is_polynomial(GiNaC::ex const&) const' 
/tmp/ccojEpA1.o(.gnu.linkonce.t._ZN5GiNaC9containerISt6vectorE9get_tinfoEv+0x4): In function `GiNaC::container<std::vector>::get_tinfo()': 
: undefined reference to `GiNaC::container<std::vector>::tinfo_static' 
collect2: ld returned 1 exit status 

I've attached GiNaC's config.log.  If any additional information is required please let me know.  Thanks for any help/ideas! 

Chris Bouchard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/x-gzip
Size: 9822 bytes
Desc: not available
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20080424/0c41e61e/attachment.gz 

More information about the GiNaC-list mailing list