[PPL-devel] Question about compiling and running C-programs with PPL

Roberto Bagnara bagnara at cs.unipr.it
Wed Jun 12 09:13:10 CEST 2002


Martin Rohde wrote:
> Hello,
> 
> I'm trying to work with an older version (0.2) now (just to practice). I
> installed everything and "make check" confirmed that everything was OK.
> 
> I took the inters1.cc file and replaced all include files with "ppl.hh". I
> also removed the print_constraints commands and namespace std. I tried to
> compile the code, but I get a huge amount of error messages saying
> 'undefined reference to...'. The compilation was started with
> 
> gcc inters1.cc -L/opt/ppl-0.2/lib -I/opt/ppl-0.2/include -lgmp
> 
> I think I do something stupid (as a beginner in using libraries), but I
> can't figure out what. Could you tell me how to use this library correctly
> in my code?

Dear Martin,

at a first glance, your command line lacks -lppl -lgmpxx.
In fact, with -L/opt/ppl-0.2/lib you are only adding an element
to the library search path, but you should also specify, with
-lppl, that you request linking with the PPL library.
For the same reason, you should also use -lgmpxx to link with
the C++ interface of GMP.  As a final note, using the g++ command
instead of gcc is safer (even though for the command you quoted
I believe it does not matter).
All the best

     Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it




More information about the PPL-devel mailing list