
Remko Troncon wrote:
As promised, i looked at PPL 0.2. I am experiencing some troubles compiling a very small test file against PPL though. Something goes wrong when g++ tries to link my file. I have attached the test program and the message log. Maybe you can tell me what i'm doing wrong ?
Dear Remko,
the first thing that comes to mind is that you may have compiled the PPL library with one compiler (e.g., g++-2.96.98) and the program test.cpp with another one (e.g., g++-3.0.3). I say this because your link command starts with `g++-3.0', whereas the configuration and compilation mechanism of the PPL has probably invoked `g++'.
In an attempt to reproduce the problem, I have tried the following:
tar zxf ppl-0.2.tar.gz cd ppl-0.2 ./configure --prefix=/usr/local/ppl make su <pwd> make install exit cd .. g++ -I/usr/local/ppl/include -c test.cpp g++ -L/usr/local/ppl/lib -L/usr/local/gmp/lib test.o -o t -lgmp -lppl t <output follows> -A + B >= 0 -B >= -10 B >= 0 A >= 0
On my system, g++ _is_ g++-3.0.3 so that the library and test.cpp have been compiled with the same compiler. I have also tried compiling the PPL with a pre-3 version of the compiler and the errors I get are similar to yours (though not identical). Can you please try the commands `g++-3.0 -v' and `g++ -v'? If the outputs are different that may be the problem (the ABI of g++-3.x is not backward compatible with previous versions).
If the above diagnosis makes sense, you can overcome the problem by adding `--with-cxx=g++-3.0' to the configure options for the PPL. If my diagnosis does not make sense, please come back to us. All the best
Roberto

the first thing that comes to mind is that you may have compiled the PPL library with one compiler (e.g., g++-2.96.98) and the program test.cpp with another one (e.g., g++-3.0.3). I say this because your link command starts with `g++-3.0', whereas the configuration and compilation mechanism of the PPL has probably invoked `g++'.
You're right, it was due to my compiler. I recompiled GMP with my g++-3.0, recompiled PPL, recompiled my test program, and now everything seems to work just fine. I was pretty sure i compiled PPL with the -with-cxx=g++-3.0 flag, but maybe i was wrong.
Thanks a lot for all your help,
Remko
PS: I haven't got around to using the library yet due to the problems i had, but i can already tell that the documentation (generated with doxygen) looks very good and seems very clear. I'll let you know if i have suggestions for additions to the library.
participants (2)
-
Remko Troncon
-
Roberto Bagnara