build error under MinGW

Asked by Chaffra Affouda on 2013-03-12

Hello, I am getting the error below when building under MinGW. i dont' quite know what it means. Hopefully someome has an idea because CGAL compiles well and is detected by dolfin. I am using CGAL-4.0.1.

In file included from e:/src/fenics-source-snapshot-win/build/CMakeExternals/src
/DOLFIN/dolfin/generation/GeometryToCGALConverter.cpp:35:0:
E:/src/fenics-source-snapshot-win/build/CMakeExternals/src/DOLFIN/dolfin/math/ba
sic.h:40:13: error: expected unqualified-id before 'double'
E:/src/fenics-source-snapshot-win/build/CMakeExternals/src/DOLFIN/dolfin/math/ba
sic.h:40:13: error: expected ')' before 'double'
make[5]: *** [dolfin/CMakeFiles/dolfin.dir/generation/GeometryToCGALConverter.cp
p.obj] Error 1
make[4]: *** [dolfin/CMakeFiles/dolfin.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [CMakeExternals/src/DOLFIN-stamp/DOLFIN-build] Error 2
make[1]: *** [CMakeFiles/DOLFIN.dir/all] Error 2
make: *** [all] Error 2

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Chaffra Affouda
Solved:
2013-03-12
Last query:
2013-03-12
Last reply:
Chaffra Affouda (chaffra) said : #1

GeometryToCGALConverter.cpp should include #include <dolfin/common/constants.h> instead of #include <dolfin/math/basic.h>. This breaks on MinGW

Chaffra Affouda (chaffra) said : #2

you have to add

#undef near

to #include <dolfin/math/basic.h>. Apparently near is already defined in MinGW.