Subject: CGAL users discussion list
List archive
- From: Hanjun Kim <>
- To:
- Subject: Re: [cgal-discuss] question on Installation on unix
- Date: Sun, 8 Feb 2009 09:35:55 -0600 (CST)
Hi Joachim
Actually, it was installed by computer staff in my department. So, now we have 3.4 installed, but it still doesn't work. We installed using debian package, but it still doesn't work.
I tried the following code
==================
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_2.h>
#include <iostream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point;
typedef CGAL::Polygon_2<K> Polygon_2;
using std::cout; using std::endl;
int main()
{
Point points[] = { Point(0,0), Point(5.1,0), Point(1,1), Point(0.5,6)};
Polygon_2 pgn(points, points+4);
// check if the polygon is simple.
cout << "The polygon is " <<
(pgn.is_simple() ? "" : "not ") << "simple." << endl;
// check if the polygon is convex
//cout << "The polygon is " <<
//(pgn.is_convex() ? "" : "not ") << "convex." << endl;
return 0;
}
====================
I compiled this using the command
$g++ abc.cpp -o abc.out
and the error is
==================
abc.cpp:1:64: error: CGAL/Exact_predicates_inexact_constructions_kernel.h: No such file or directory
abc.cpp:2:28: error: CGAL/Polygon_2.h: No such file or directory
abc.cpp:5: error: 'CGAL' has not been declared
abc.cpp:5: error: expected initializer before 'K'
abc.cpp:6: error: 'K' has not been declared
abc.cpp:6: error: expected initializer before 'Point'
abc.cpp:7: error: 'CGAL' has not been declared
abc.cpp:7: error: expected initializer before '<' token
abc.cpp: In function 'int main()':
abc.cpp:13: error: 'Point' was not declared in this scope
abc.cpp:13: error: expected `;' before 'points'
abc.cpp:14: error: 'Polygon_2' was not declared in this scope
abc.cpp:14: error: expected `;' before 'pgn'
abc.cpp:18: error: 'pgn' was not declared in this scope
==================
Could you please help me?
Thanks,
Hanjun
On Sat, 7 Feb 2009, Joachim Reichel wrote:
Hi Hanjun,
I first tried Debian packages and but it didn't work well.
Unfortunately, you don't say why it doesn't work. There are no known problems
building the examples/demos in the (3.3) Debian package, so it should just
work.
So, I
downloaded the CGAL-3.3.tar.gz. (not 3.4 accidentally) and built in the
interactive mode.
In the CGAL-3.3/lib folder, I have
README i686_Linux-2.6_g++-4.1.2, where the second one is a directory.
You never mentioned so far that you use CGAL 3.3, which is more than 18 months
old now. Since you said "accidentally", you seem to have no particular reason
to
use 3.3, right? I strongly recommend to use 3.4 then, and not to waste time on
problems with an old version.
Again, there are Debian packages for 3.4 as well and I'm not aware of any
problems building the examples/demos (read
/usr/share/doc/libcgal-demo/README.Debian).
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
- [cgal-discuss] question on Installation on unix, hkim, 02/06/2009
- Re: [cgal-discuss] question on Installation on unix, Andreas Fabri, 02/06/2009
- RE: [cgal-discuss] question on Installation on unix, avanindra, 02/07/2009
- Re: RE: [cgal-discuss] question on Installation on unix, hkim, 02/07/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/07/2009
- [cgal-discuss] cgal c2t3 face status, Hanjoerg Seybold, 02/07/2009
- Re: [cgal-discuss] cgal c2t3 face status, Joachim Reichel, 02/07/2009
- Re: [cgal-discuss] cgal c2t3 face status, Laurent Rineau (GeometryFactory), 02/07/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/07/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/07/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/09/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/09/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/09/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/09/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/09/2009
- Re: [cgal-discuss] question on Installation on unix, Hanjun Kim, 02/08/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/07/2009
- [cgal-discuss] cgal c2t3 face status, Hanjoerg Seybold, 02/07/2009
- Re: [cgal-discuss] question on Installation on unix, Joachim Reichel, 02/07/2009
- Re: RE: [cgal-discuss] question on Installation on unix, hkim, 02/07/2009
Archive powered by MHonArc 2.6.16.