Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem using CGAL with OpenCV under Windows and

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem using CGAL with OpenCV under Windows and


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] Problem using CGAL with OpenCV under Windows and
  • Date: Fri, 21 Nov 2008 16:27:19 +0100
  • Organization: INRIA


wrote:
Good afternoon,

I am trying the CGAL libraries to compute the Medial-Axis of a contour. I get
that contour using OpenCV, and I have to use OpenCV. This is part of my tesis
research work so I am really interested in completing my tests as soon as
possible.

Unfortunately, I think that there is some kind of incompatibility between
OpenCV and CGAL and I can not figure out how to solve it.

All the errors are related to the Assertions.h file:

Example:
\include\cgal\assertions.h(34) : error C2143: syntax error : missing '}'
before
'goto'

This line is:

enum Failure_behaviour { ABORT, EXIT, EXIT_WITH_SUCCESS, CONTINUE,
THROW_EXCEPTION };

What most probably happens is that OpenCV (or other software you use), defines
one of these names as a macro, which clashes with CGAL's enum.

One probable fix is to include CGAL's header first, before the other
problematic
headers that defines the macro in question.
(and maybe suggest that OpenCV does not define macros with such general names:
good practice for libraries is to have macros with prefixes to avoid clashes)

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.16.

Top of Page