Hello, On Thu, Apr 24, 2008 at 08:45:14AM -0500, Chris Bouchard wrote:
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
It looks like the headers and the library come from different (incompatible) versions of GiNaC (that is, headers from 1.4.X and library from 1.3.Y)...
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
... so some inlined methods/functions present in the headers can not be resolved from the shared library.
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.
That depends (ABI changes are very platform dependent). On GNU/Linux x86 and x86_64 g++ [3.4, 4.2] seem to have compatible ABIs, so one can mix C++ libraries compiled with g++ [3.4, 4.2] (unless those libraries are incompatible for reasons other than compiler and standard library ABI changes).
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?
Actually, we have some "know to work with" list in the `INSTALL' file.
Does this explanation sound legitimate to you?
No. Best regards, Alexei -- All science is either physics or stamp collecting.