Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] do_intersect name lookup problem when using multiple kernels

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] do_intersect name lookup problem when using multiple kernels


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] do_intersect name lookup problem when using multiple kernels
  • Date: Thu, 22 Sep 2011 09:58:44 +0200

A golden rule in CGAL is that CGAL/basic.h should be included before
any other CGAL header (or a CGAL kernel that include CGAL/basic.h)

See 2.4
http://www.cgal.org/Manual/beta/doc_html/cgal_manual/Preliminaries/Chapter_main.html

Sebastien.


On 09/21/2011 10:32 PM, Frankie Li wrote:
Hi all,

I was wondering if anyone has seen the following problem. The version of
CGAL I have been using primarily are 3.5.1 and 3.6.


In the AABB_tree example ("AABB_triangle_3_example.cpp"), if we add an
include for "exact predicates inexact constructions kernel in front of
the <CGAL/AABB_traits.h> include:


-----------------------------------------------------------------

#include <iostream>
#include <list>

#include <CGAL/AABB_tree.h> // must be inserted before kernel
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ line added
#include <CGAL/AABB_traits.h>
#include <CGAL/AABB_triangle_primitive.h>

#include <CGAL/Simple_cartesian.h>
-----------------------------------------------------------------


I would end up with the following error:

function_objects.h:1869: error: no matching function for call to
'do_intersect(const CGAL::Sphere_3<CGAL::Simple_cartesian<double> >&,
const CGAL::Bbox_3&, CGAL::Simple_cartesian<double>)'


If I were to move the new line to *after* <CGAL/AABB_traits.h>


-----------------------------------------------------------------

#include <iostream>
#include <list>

#include <CGAL/AABB_tree.h> // must be inserted before kernel

#include <CGAL/AABB_traits.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ line added
#include <CGAL/AABB_triangle_primitive.h>

#include <CGAL/Simple_cartesian.h>
-----------------------------------------------------------------


The problem goes away. Am I not supposed to have the two files included
at the same time? The version of gcc I'm using is gcc 4.4.5.


Thanks,


Frankie





Archive powered by MHonArc 2.6.16.

Top of Page