Subject: CGAL users discussion list
List archive
- From: Matthew Denno <>
- To:
- Subject: [cgal-discuss] Trouble with Examples
- Date: Thu, 4 Jun 2009 09:57:41 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=tr9o8t885DKey7zrNJRf8O5FaaWAg3G6NLLGHGu2zWq1HR8wL3NVnTWnxq1YaKJcec rbI4EyxzLgjSguJRkq21zUtec3UyxkMzz2+I58/HzM3lvtvkeKrqlSjMh44iCTo1SH2N qhVjgAyKhARRy43q7vlirvFd+kEa8YaIE6bvQ=
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
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.
If anyone could help me get the examples running, or point me in the
direction of an online resource that would help, it would be greatly
appreciated. Any pointers would be helpful; I am stuck and it seems
like there are so many things it could be and I am not sure where to
start.
CODE:
#include <iostream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/convex_hull_2.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point_2;
int main()
{
Point_2 points[5] = { Point_2(0,0), Point_2(10,0), Point_2(10,10),
Point_2(6,5), Point_2(4,1) };
Point_2 result[5];
Point_2 *ptr = CGAL::convex_hull_2( points, points+5, result );
std::cout << ptr - result << " points on the convex hull" << std::endl;
return 0;
}
OUTPUT:
**** Build of configuration Debug for project CGALcpp2 ****
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
/usr/include/CGAL/gmpxx_coercion_traits.h:43: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:43: error: template argument
1 is invalid
/usr/include/CGAL/gmpxx_coercion_traits.h:58: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:58: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:58: error: template argument
1 is invalid
/usr/include/CGAL/gmpxx_coercion_traits.h:73: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:73: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:73: error: template argument
1 is invalid
/usr/include/CGAL/gmpxx_coercion_traits.h:90: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:90: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:90: error: template argument
1 is invalid
/usr/include/CGAL/gmpxx_coercion_traits.h:105: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:105: error: ‘::__gmp_expr’
has not been declared
/usr/include/CGAL/gmpxx_coercion_traits.h:105: error: wrong number of
template arguments (3, should be 2)
/usr/include/CGAL/Coercion_traits.h:152: error: provided for
‘template<class A, class B> struct CGAL::Coercion_traits’
/usr/include/CGAL/gmpxx_coercion_traits.h:105: error: expected
unqualified-id before ‘>’ token
In file included 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/mpz_class.h:51: error: ‘mpz_class’ was not declared
in this scope
/usr/include/CGAL/mpz_class.h:51: error: template argument 1 is invalid
/usr/include/CGAL/mpz_class.h:52: error: ‘mpz_class’ was not declared
in this scope
/usr/include/CGAL/mpz_class.h:52: error: template argument 1 is invalid
/usr/include/CGAL/mpz_class.h:201: error: ‘mpz_class’ was not declared
in this scope
/usr/include/CGAL/mpz_class.h:201: error: template argument 1 is invalid
/usr/include/CGAL/mpz_class.h:202: error: ‘mpz_class’ was not declared
in this scope
/usr/include/CGAL/mpz_class.h:202: error: template argument 1 is invalid
/usr/include/CGAL/mpz_class.h:302: error: ‘mpz_class’ was not declared
in this scope
/usr/include/CGAL/mpz_class.h:302: error: template argument 1 is invalid
/usr/include/CGAL/mpz_class.h:323: error: ‘mpz_class’ was not declared
in this scope
/usr/include/CGAL/mpz_class.h:323: error: template argument 1 is invalid
In file included from /usr/include/CGAL/gmpxx.h:48,
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/mpq_class.h:49: error: ‘mpq_class’ was not declared
in this scope
/usr/include/CGAL/mpq_class.h:49: error: template argument 1 is invalid
/usr/include/CGAL/mpq_class.h:50: error: ‘mpq_class’ was not declared
in this scope
/usr/include/CGAL/mpq_class.h:50: error: template argument 1 is invalid
/usr/include/CGAL/mpq_class.h:146: error: ‘mpq_class’ was not declared
in this scope
/usr/include/CGAL/mpq_class.h:146: error: template argument 1 is invalid
/usr/include/CGAL/mpq_class.h:147: error: ‘mpq_class’ was not declared
in this scope
/usr/include/CGAL/mpq_class.h:147: error: template argument 1 is invalid
/usr/include/CGAL/mpq_class.h:248: error: ‘mpq_class’ was not declared
in this scope
/usr/include/CGAL/mpq_class.h:248: error: template argument 1 is invalid
In file included 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.h:54: error: ‘::__gmp_expr’ has not been declared
/usr/include/CGAL/gmpxx.h:54: error: ‘::__gmp_expr’ has not been declared
/usr/include/CGAL/gmpxx.h:54: error: wrong number of template
arguments (2, should be 1)
/usr/include/CGAL/Algebraic_structure_traits.h:66: error: provided for
‘template<class Type_> class CGAL::Algebraic_structure_traits’
/usr/include/CGAL/gmpxx.h:54: error: expected unqualified-id before ‘>’ token
/usr/include/CGAL/gmpxx.h:58: error: ‘::__gmp_expr’ has not been declared
/usr/include/CGAL/gmpxx.h:58: error: ‘::__gmp_expr’ has not been declared
/usr/include/CGAL/gmpxx.h:58: error: wrong number of template
arguments (2, should be 1)
/usr/include/CGAL/Real_embeddable_traits.h:175: error: provided for
‘template<class Type_> class CGAL::Real_embeddable_traits’
/usr/include/CGAL/gmpxx.h:58: error: expected unqualified-id before ‘>’ token
In file included from /usr/include/CGAL/Filtered_kernel.h:33,
from
/usr/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:29,
from ../src/testing.cpp:10:
/usr/include/CGAL/Exact_type_selecter.h:88: error: ‘::mpz_class’ has
not been declared
/usr/include/CGAL/Exact_type_selecter.h:88: error: ‘::mpz_class’ has
not been declared
/usr/include/CGAL/Exact_type_selecter.h:88: error: template argument 1
is invalid
/usr/include/CGAL/Exact_type_selecter.h:92: error: ‘::mpq_class’ has
not been declared
/usr/include/CGAL/Exact_type_selecter.h:92: error: ‘::mpq_class’ has
not been declared
/usr/include/CGAL/Exact_type_selecter.h:92: error: template argument 1
is invalid
make: *** [src/testing.o] 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.