View Issue Details

IDProjectCategoryView StatusLast Update
0002601OpenFOAMPatchpublic2017-07-05 17:29
Reporterhandrake0724 Assigned Towill  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSLinuxOS VersionArch
Summary0002601: to_double error in foamyQuadMesh/CGALTriangulation2DKernel.H
Descriptioncompiling foamyQuadMesh produces the following error:

include/CGAL/Triangulation_2.h:3017:30: error: 'to_double' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   const double ry = to_double(get_approx(r).y());

the error is caused by a missing header "CGAL/number_utils.h"
TagsNo tags attached.

Activities

handrake0724

2017-07-04 12:47

viewer  

patch.diff (342 bytes)   
--- CGALTriangulation2DKernel.H.old	2017-07-04 20:34:03.819767859 +0900
+++ CGALTriangulation2DKernel.H	2017-07-04 19:46:21.283195039 +0900
@@ -33,6 +33,7 @@
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+#include "CGAL/number_utils.h"
 #include "CGAL/Delaunay_triangulation_2.h"
 
 #ifdef CGAL_INEXACT
patch.diff (342 bytes)   

wyldckat

2017-07-04 14:59

updater   ~0008331

Questions:

 1. With which GCC version does this happen?

 2. With which CGAL version is this happening?

handrake0724

2017-07-04 15:07

viewer   ~0008332

I am using GCC 6.3.0.
I tested with CGAL 4.10 but not sure about 4.9.x

will

2017-07-05 16:36

manager   ~0008337

Last edited: 2017-07-05 16:36

Confirmed. The error is a missing header (or a header ordering issue) in CGAL. We can get around it by explicitly reordering the include. E.g.,

diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CGALTriangulation2DKernel.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CGALTriangulation2DKernel.H
index 012192b1f..0809a26e3 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CGALTriangulation2DKernel.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CGALTriangulation2DKernel.H
@@ -33,6 +33,7 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+#include "CGAL/number_utils.h"
 #include "CGAL/Delaunay_triangulation_2.h"
 
 #ifdef CGAL_INEXACT

will

2017-07-05 17:29

manager   ~0008343

@handrake0724 Thanks for the report. Resolved by commit 1ff57870007ac317d95a1756b41fd76c5a1e8f26 in dev, and 53b4b3fc2dfcaad06e3595993094cebe14d9aa55 in 4.x.

Issue History

Date Modified Username Field Change
2017-07-04 12:47 handrake0724 New Issue
2017-07-04 12:47 handrake0724 File Added: patch.diff
2017-07-04 14:59 wyldckat Note Added: 0008331
2017-07-04 15:07 handrake0724 Note Added: 0008332
2017-07-05 16:36 will Note Added: 0008337
2017-07-05 16:36 will Note Edited: 0008337
2017-07-05 16:36 will Note Edited: 0008337
2017-07-05 17:29 will Assigned To => will
2017-07-05 17:29 will Status new => resolved
2017-07-05 17:29 will Resolution open => fixed
2017-07-05 17:29 will Note Added: 0008343