[ITK] Compiling ITK with MinGW and C++11

Pierre Barbier de Reuille pierre at barbierdereuille.net
Tue Jun 9 10:18:07 EDT 2015


No, I did that! The issue is that if compiling with -std=c++11, MinGW
doesn't define "_finite", but vnl_math.cxx always assumes it is.

On Tue, 9 Jun 2015 at 15:54 Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:

> Hello,
>
> It sounds like you did not configure ITK with C++11. If you are going to
> enable C++11 when using ITK, you must configure ITK with C++11.
>
> Please start with an empty build directory and add the following to the
> command line to enable C++11 of the initial configuration: "-DCMAKE_CXX_FLAGS:STRING=-std=c++11".
> This variable must be set before the first configuration.
>
> HTH,
> Brad
>
> On Jun 9, 2015, at 7:30 AM, Pierre Barbier de Reuille <
> pierre at barbierdereuille.net> wrote:
>
> Dear all,
>
> I am using ITK in a software that I am compiling with MinGW64 with C++11
> enabled. ITK mostly compiles, with one exception: vnl_math.cxx has
> hard-coded the definition of finite which is not valid if C++11 is enabled.
> I attach a patch of my modifications against the git repository. The
> modification simply specifies that, if we're compiling with C++11, then we
> should be using "std::isfinite" instead of "finite".
>
> Of course, if there was a way to compile it without this hack, I would be
> happy to revert it! Otherwise, could it be tested and included in the next
> versions of ITK?
>
> Thanks,
>
> Pierre
>
> <mingw_math.patch>_______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150609/509efa9b/attachment.html>


More information about the Community mailing list