[PPL-devel] Re: Thanks & Last problem (hope)

Roberto Bagnara bagnara at cs.unipr.it
Mon Jul 5 23:13:33 CEST 2004


Enrico Oliosi wrote:
> thanks a lot for your help, now it seems that the libreries are called
> correctly.

Hi Enrico,

no need to thank but, please, do send your messages to ppl-devel at cs.unipr.it
and not to any other address.

> 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).

I think you have misinterpreted the subdirectory `tests' in the distribution.
This directory and the files it contains are meant to help testing the library.
To do so, you should just run `make check' in your top-level build directory
(i.e., you run `make check' just after having done `make').
And, by all means, do _not_ rename `ppl.hh' as `ppl_install.hh'.

> 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

The errors you get are absolutely normal.  The programs in the `tests'
subdirectory are not meant to be compiled like that.  You can study
that programs to see examples of use of the PPL, but cannot use them
as they are and compile them without regard to the modules they rely upon.
(It is even unclear why you should want to use them as they are.)
However, I attach here a modified version of the program addconstraint1.cc
you can play with.

> I hope that this is the last time that I disturb you.

Don't even mention it.  To the contrary, do tell us something about
what you plan to do with the library.  And do not hesitate to contact
us whatever problem or suggestion or any other kind of feedback you may have.
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