Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] question on Installation on unix

Subject: CGAL users discussion list

List archive

[cgal-discuss] question on Installation on unix


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] question on Installation on unix
  • Date: Fri, 6 Feb 2009 23:28:34 +0100 (CET)

Hi all,

I just have installed the CGAL on my machine, but it doesn't seem to be
working.

I did everything I was told to do on installation manual, and it seems that
there's no problem recognizing the libraries. I think I have to change some
environment, but I have no idea on what to change.

I have tried the following sample code;
examples/Convex_hull_2/ch_example_from_cin_to_cout.cpp
which is

=============
#include <CGAL/Cartesian.h>
#include <CGAL/ch_graham_andrew.h>

typedef CGAL::Point_2<CGAL::Cartesian<double> > Point_2;

int main()
{
CGAL::set_ascii_mode(std::cin);
CGAL::set_ascii_mode(std::cout);
std::istream_iterator< Point_2 > in_start( std::cin );
std::istream_iterator< Point_2 > in_end;
std::ostream_iterator< Point_2 > out( std::cout, "\n" );
CGAL::ch_graham_andrew( in_start, in_end, out );
return 0;
}
=============
I once commented out all lines in the main function except 'return 0'. And it
compiled.
But if I comment out all but the first and the last line in the main function,
it shows the following error.

==========================
/tmp/ccDDajNZ.o: In function `main':
conv.cpp:(.text+0x8b): undefined reference to
`CGAL::set_ascii_mode(std::basic_ios<char, std::char_traits<char> >&)'
collect2: ld returned 1 exit status
=========================

Any help?

Thanks



Archive powered by MHonArc 2.6.16.

Top of Page