Boost logo

Boost :

Subject: [boost] [polygon] examplefile compilation failed
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2009-08-31 15:15:03


Hi Luke and polygonists!

I had problems compiling the example files from the doc's main
page with msvc-9. None of custom_p*.cpp examples compiled.
Also the connectivity_extraction_usage.cpp example failed.

(1) connectivity_extraction_usage.cpp:

#include <boost/gtl/gtl.hpp>
must be replaced by
#include <boost/polygon/polygon.hpp>

namespace gtl = boost::polygon;
has to be added.

(2) custom_point.cpp:
compilation yields:
1>.\custom_point.cpp(75) : error C2757: 'gtl' : a symbol with this
name already exists and therefore this name cannot be used as a
namespace name
1>.\custom_point.cpp(77) : error C2143: syntax error : missing ';' before '<'
1>.\custom_point.cpp(77) : error C2913: explicit specialization;
'::geometry_concept' is not a specialization of a class template
and many errors more

after replacing
gtl::
by
boost::polygon::
and
namespace gtl { ... }
by
namespace boost { namespce polygon { ... } }

and adding

typedef int coordinate_type;

to struct CPoint

the code finally compiled.
Are these examples intended to be excercises ;)

HTH
Joachim


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk