GeometryToCGALConverter.cpp

Bug #1154248 reported by Chaffra Affouda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
New
Undecided
Unassigned

Bug Description

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

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

Revision history for this message
Garth Wells (garth-wells) wrote : Re: [Bug 1154248] [NEW] GeometryToCGALConverter.cpp

On 12 March 2013 18:39, Chaffra Affouda <email address hidden> wrote:
> Public bug reported:
>
> GeometryToCGALConverter.cpp should include #include
> <dolfin/common/constants.h> instead of #include <dolfin/math/basic.h>.

This doesn't explain the problem. What declaration is missing is
GeometryToCGALConverter.cpp?

Garth

> This breaks on MinGW with
>
> 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
>
> ** Affects: dolfin
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of DOLFIN
> Core Team, which is subscribed to DOLFIN.
> https://bugs.launchpad.net/bugs/1154248
>
> Title:
> GeometryToCGALConverter.cpp
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/1154248/+subscriptions

Revision history for this message
Chaffra Affouda (chaffra) wrote :

You are right. The problem is that I do not understand the error. On MinGW,

#include <dolfin/math/basic.h> leads to the error above. I replaced it with #include <dolfin/common/constants.h> and it compiled but I dont even know why because in that case the "near" functions in the file are undeclared...

Revision history for this message
Garth Wells (garth-wells) wrote :

Try adding

    #include <cstring>

in dolfin/math/basic.h

Revision history for this message
Chaffra Affouda (chaffra) wrote :

That did not help. Is the order important? My includes look like

#include <cstddef>
#include <utility>
#include <cstring>
#include <dolfin/common/constants.h>

Revision history for this message
Chaffra Affouda (chaffra) wrote :

It built after adding

#include <cstddef>
#include <utility>
#include <dolfin/common/constants.h>
#undef near

. Maybe we should add something like

#ifdef WIN32
#undef near
#endif

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.