[Fwd: Thanks & Last problem (hope)]

-------- Original Message -------- Subject: Thanks & Last problem (hope) Date: Mon, 5 Jul 2004 13:43:29 +0200 (CEST) From: Enrico Oliosi enrico.oliosi@students.univr.it To: Roberto Bagnara bagnara@cs.unipr.it References: Pine.LNX.4.60.0407011642570.1674@theory.sci.univr.it 40E42CAE.5060500@cs.unipr.it Pine.LNX.4.60.0407021129540.4449@theory.sci.univr.it 40E67A97.6000403@cs.unipr.it
On Sat, 3 Jul 2004, Roberto Bagnara wrote:
Dear Enrico,
your invoking g++ the wrong way. First, the -L option wants the path to a directory (where to look for library files), not the complete path leading to a specific *.a file. Secondly, you must link with the PPL, the C++ interface of GMP, and with GMP itself, and you need 3 -l switches to specify that. Summing it up, your compilation command should be something like
g++ -g constraints1.cc -I ../ppl05/include/ -L ../ppl05/lib/ -lppl -lgmpxx -lgmp
assuming that you have installed both GMP and PPL in ../ppl05. If GMP has been installed elsewhere, you will have to add the corresponding -I and -L switches. Please, let us know if this solves your problem. All the best,
Roberto
Dear Roberto, thanks a lot for your help, now it seems that the libreries are called correctly. I have some problems with 'print.hh' and 'set_handlers()' functions again. I rename file 'ppl.hh' in 'ppl_install.hh' (the compiler doesn't generate 'ppl_install.hh' file).
When I try to compile some tests, like addconstraint1.cc, the compiler gives these problems:
/tmp/cceoSN0Q.o(.text+0x16): In function `main': /home/enrico/Tesi/Ppl/ppl-0.5/tests/ppl_install.hh:2157: undefined reference to `set_handlers()'
/tmp/cceoSN0Q.o(.text+0x33d): In function `main': /home/enrico/Tesi/Ppl/ppl-0.5/tests/addconstraint1.cc:22: undefined reference to `print_constraints(Parma_Polyhedra_Library::Polyhedron const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_ostream<char, std::char_traits<char> >&)'
/tmp/cceoSN0Q.o(.text+0x886):/home/enrico/Tesi/Ppl/ppl-0.5/tests/addconstraint1.cc:37: undefined reference to `print_constraints(Parma_Polyhedra_Library::Polyhedron const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_ostream<char, std::char_traits<char> >&)'
collect2: ld returned 1 exit status
with comand-line
bash>g++ -g addconstraint1.cc -I . -L ../../ppl05/lib/ -lppl -lgmpxx -lgmp
I hope that this is the last time that I disturb you.
Best regards,
Enrico
participants (1)
-
Roberto Bagnara