[Dune] Dune on Windows MinGW
Bård Skaflestad
Bard.Skaflestad at sintef.no
Tue May 3 20:40:31 CEST 2011
Andreas, Bernd, All
Sorry to barge in on the discussion, but I'd like to make a little comment concerning the 'M_PI' issue. Including <cmath> may help on MinGW, but in reality portable code must not reference the preprocessor symbol 'M_PI' without a (more or less manual) separate definition. Any given implementation may, and many do--particularly on Linux, define 'M_PI' as a (double precision) approximation to \pi as an extension, but no implementation is obliged to provide this symbol. In fact, when compiling in "maximally standards conforming" mode, an implementation must *not* provide the 'M_PI' symbol.
In short, any code that references 'M_PI' without explicitly defining the symbol itself is non-portable.
Sincerely,
--
Bård Skaflestad <Bard.Skaflestad at sintef.no>
SINTEF ICT, Applied Mathematics
________________________________________
From: dune-bounces+bard.skaflestad=sintef.no at dune-project.org [dune-bounces+bard.skaflestad=sintef.no at dune-project.org] On Behalf Of Andreas Dedner [dedner at mathematik.uni-freiburg.de]
Sent: 03 May 2011 19:13
To: dune at dune-project.org
Subject: Re: [Dune] Dune on Windows MinGW
Dear Bernd,
thanks - I did not know that (was not even aware of MinGW).
Concerning the 2 problems in dgf:
1) is the problem solved, by including cmath in
dgfprojectionblock.cc.(it is missing and should be included in any case).
2) what exactly is the error in the temroraryFileName method?
Best
Andreas
On 03/05/11 17:57, Bernd Flemisch wrote:
> Dear Dune,
>
> I am not sure whether I tell you something new and/or interesting, but
> since I did not find this on the list, I thought I just share it.
>
> I tried to install Dune 2.0 under Windows on top of MinGW,
> http://www.mingw.org/. And it worked almost without modifications. In
> particular, I had to
>
> - define the constant M_PI in dgfprojectionblock.cc line 113.
>
> - change the temroraryFileName method in dgfparser.cc line 1204 (I
> simply return an empty string and comment out the rest).
>
> All core modules of the 2.0 release compile. Only the test in
> dune-istl and the finiteelements test of the dune-grid-howto fail due
> to missing headers sys/timer.h and sys/resource.h. The other
> grid-howto programs seem to run correctly and produce meaningful vtk
> output.
>
> I did not use any external packages.
>
> Kind regards
> Bernd
>
_______________________________________________
Dune mailing list
Dune at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune
More information about the Dune
mailing list