Subject: CGAL users discussion list
List archive
- From: Matthew Denno <>
- To:
- Subject: Re: [cgal-discuss] Trouble with Examples
- Date: Thu, 4 Jun 2009 13:16:11 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=UKgeLXu0op/zPCprXGv1sElW9XRP1jm1kCU0yAOJuThGl1zoyF/Noi8TMN8CekF2pp IZKimg24l8aXAf+ZrECizE76yIFyuMhyEsIN/u7wXr0u8dwJDD4gaJie9jufgZCXaegY nKo9ynV3Co6+KOysLfZpCkezPMY9nXrHrZAVA=
Joachim,
Thanks so much for your reply. I really appreciate it.
On Thu, Jun 4, 2009 at 12:42 PM, Joachim Reichel
<>
wrote:
> Hi,
>
>> Hello - This is my first post to the list. I feel bad taking your
>> time with my very beginner questions as I am new to both CGAL and C++.
>> Most of my programming experience is with scripting languages like
>> Python and VBA, however, the CGAL python bindings just don't have the
>> functionality I need so I am going to delve into C++. I am running
>> Ubuntu 9.04 with the Eclipse IDE with the CDT plug in. I installed
>> libcgal3, libcgal-dev and libcgal-demo from:
>>
>> ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian/archive/libcgal-demo_3.4-1_all.deb
>> ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian/archive/libcgal-dev_3.4-1_i386.deb
>> ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian/archive/libcgal3_3.4-1_i386.deb
>
> Note that these packages are for Debian sid, and not for Ubuntu 9.04.
> There are good chances that they work, but there might also be strange
> problems.
Do know of any Ubuntu binaries? Or do you think it would be best for
me to compile the source myself? I looked at the directions on the
CGAL webpage for doing this and I think I could handle it (maybe).
>
>> Now on to my problem. I create a new C++ project in Eclipse, add
>> "/usr/include/CGAL" to the includes, and create a new file called
>> test.cpp with the code below in it. Then I save and build, and get
>> the errors shown below. It looks like it has something to do with GMP
>> but I have it installed and I am not sure what else to look for or
>> what the errors mean.
> [...]
>> make all
>> Building file: ../src/testing.cpp
>> Invoking: GCC C++ Compiler
>> g++ -I/usr/include/CGAL -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP
>> -MF"src/testing.d" -MT"src/testing.d" -o"src/testing.o"
>> "../src/testing.cpp"
>> In file included from /usr/include/CGAL/mpz_class.h:29,
>> from /usr/include/CGAL/gmpxx.h:47,
>> from /usr/include/CGAL/number_type_basic.h:91,
>> from /usr/include/CGAL/basic.h:36,
>> from /usr/include/CGAL/Cartesian/Cartesian_base.h:28,
>> from /usr/include/CGAL/Simple_cartesian.h:28,
>> from
>> /usr/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:28,
>> from ../src/testing.cpp:10:
>> /usr/include/CGAL/gmpxx_coercion_traits.h:43: error: ‘::__gmp_expr’
>> has not been declared
> [...]
>
> The problem is -I/usr/include/CGAL. Note that the include directives for
> CGAL's header files start with "CGAL/", so -I/usr/include would be
> correct. But that's the default anyway, so you don't need it at all.
>
> Adding -I/usr/include/CGAL causes a file name lookup problem between
> <CGAL/gmpxx.h> from CGAL and <gmpxx.h> from GMP, which results in the
> shown error messages.
Okay, that makes sense. Actually, I wasn't sure about adding
"/usr/include/CGAL" to the includes, so I tried it both ways. I get a
different set of errors when I don't include it. They are included at
the bottom of this message. Actually, as I look at it now, it appears
that it finishes building this way, but still has problems.
>
> Joachim
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
Thanks again for your help.
Matt
ERRORS (with out /usr/include/CGAL):
**** Build of configuration Debug for project CGALcpp2 ****
make all
Building file: ../src/testing.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/testing.d"
-MT"src/testing.d" -o"src/testing.o" "../src/testing.cpp"
Finished building: ../src/testing.cpp
Building target: CGALcpp2
Invoking: GCC C++ Linker
g++ -o"CGALcpp2" ./src/testing.o
./src/testing.o: In function `Test_runtime_rounding_modes':
/usr/include/CGAL/Interval_nt.h:153: undefined reference to
`CGAL::assertion_fail(char const*, char const*, int, char const*)'
/usr/include/CGAL/Interval_nt.h:155: undefined reference to
`CGAL::assertion_fail(char const*, char const*, int, char const*)'
/usr/include/CGAL/Interval_nt.h:153: undefined reference to
`CGAL::assertion_fail(char const*, char const*, int, char const*)'
/usr/include/CGAL/Interval_nt.h:155: undefined reference to
`CGAL::assertion_fail(char const*, char const*, int, char const*)'
./src/testing.o: In function `Interval_nt':
/usr/include/CGAL/Interval_nt.h:83: undefined reference to
`CGAL::assertion_fail(char const*, char const*, int, char const*)'
./src/testing.o:/usr/include/CGAL/Uncertain.h:205: more undefined
references to `CGAL::assertion_fail(char const*, char const*, int,
char const*)' follow
./src/testing.o: In function `Uncertain':
/usr/include/CGAL/Uncertain.h:103: undefined reference to
`CGAL::precondition_fail(char const*, char const*, int, char const*)'
/usr/include/CGAL/Uncertain.h:103: undefined reference to
`CGAL::precondition_fail(char const*, char const*, int, char const*)'
./src/testing.o: In function `Handle':
/usr/include/CGAL/Handle.h:50: undefined reference to
`CGAL::precondition_fail(char const*, char const*, int, char const*)'
./src/testing.o: In function `Gmpq_rep':
/usr/include/CGAL/GMP/Gmpq_type.h:51: undefined reference to `__gmpq_init'
./src/testing.o: In function `~Gmpq_rep':
/usr/include/CGAL/GMP/Gmpq_type.h:52: undefined reference to `__gmpq_clear'
./src/testing.o: In function `Gmpq':
/usr/include/CGAL/GMP/Gmpq_type.h:125: undefined reference to
`CGAL::assertion_fail(char const*, char const*, int, char const*)'
/usr/include/CGAL/GMP/Gmpq_type.h:126: undefined reference to `__gmpq_set_d'
./src/testing.o: In function `CGAL::Gmpq::operator-=(CGAL::Gmpq const&)':
/usr/include/CGAL/GMP/Gmpq_type.h:240: undefined reference to `__gmpq_sub'
./src/testing.o: In function `CGAL::Gmpq::operator*=(CGAL::Gmpq const&)':
/usr/include/CGAL/GMP/Gmpq_type.h:250: undefined reference to `__gmpq_mul'
./src/testing.o: In function `CGAL::operator<(CGAL::Gmpq const&,
CGAL::Gmpq const&)':
/usr/include/CGAL/GMP/Gmpq_type.h:189: undefined reference to `__gmpq_cmp'
./src/testing.o: In function `CGAL::operator==(CGAL::Gmpq const&,
CGAL::Gmpq const&)':
/usr/include/CGAL/GMP/Gmpq_type.h:184: undefined reference to `__gmpq_equal'
./src/testing.o: In function
`CGAL::Tee_for_output_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > > CGAL::ch__ref_graham_andrew_scan<__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*,
> >std::vector<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >,
> >std::allocator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > > > >,
> > > > >CGAL::Tee_for_output_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > >, CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >
>(__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*,
> >std::vector<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >,
> >std::allocator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > > > >,
> > > > >__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*,
> >std::vector<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >,
> >std::allocator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > > > >,
> > > > >CGAL::Tee_for_output_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > >&, CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >
const&)':
/usr/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h:146: undefined
reference to `CGAL::precondition_fail(char const*, char const*, int,
char const*)'
/usr/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h:147: undefined
reference to `CGAL::precondition_fail(char const*, char const*, int,
char const*)'
/usr/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h:150: undefined
reference to `CGAL::precondition_fail(char const*, char const*, int,
char const*)'
/usr/include/CGAL/Convex_hull_2/ch_graham_andrew_impl.h:180: undefined
reference to `CGAL::assertion_fail(char const*, char const*, int, char
const*)'
./src/testing.o: In function
`CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >
>*
>CGAL::ch_akl_toussaint<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >
>(CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >
>*, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*, CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > const&)':
/usr/include/CGAL/Convex_hull_2/ch_akl_toussaint_impl.h:131: undefined
reference to `CGAL::postcondition_fail(char const*, char const*, int,
char const*)'
collect2: ld returned 1 exit status
make: *** [CGALcpp2] Error 1
- [cgal-discuss] Trouble with Examples, Matthew Denno, 06/04/2009
- Re: [cgal-discuss] Trouble with Examples, Joachim Reichel, 06/04/2009
- Re: [cgal-discuss] Trouble with Examples, Matthew Denno, 06/04/2009
- Re: [cgal-discuss] Trouble with Examples, Joachim Reichel, 06/04/2009
- Re: [cgal-discuss] Trouble with Examples, Matthew Denno, 06/05/2009
- Re: [cgal-discuss] Trouble with Examples, Joachim Reichel, 06/04/2009
- Re: [cgal-discuss] Trouble with Examples, Matthew Denno, 06/04/2009
- Re: [cgal-discuss] Trouble with Examples, Joachim Reichel, 06/04/2009
Archive powered by MHonArc 2.6.16.