<div dir="ltr">Hello all,<br><br>Thanks Matt, the dependencies were already compiled correctly. Stay put as the plot thickens.<br><br>I've reproduced the steps that I had done to compile ITK before and it worked, so I kept searching for the cause of the error and it boils down to this:<br><br>If I compile with ccmake, it fails with the mentioned errors.<br><br>if I compile with cmake, it works.<br><br>In both cases setting the flag CMAKE_CXX_FLAGS to -std=c++11<br><br>So my guess is that when running ccmake, the first configure sets the headers wrong and that doesn't get fixed when setting the -std=c++11 after the first configure is done.<br><br>Indeed it doesn't happen with ccmake -DCMAKE_CXX_FLAGS=-std=c++11 . (The ' ' are apparently unnecessary)<br><br>Cheers!<br><br>Pol<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-23 0:19 GMT+02:00 Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pol,<br>
<br>
Make sure to build ITK and everything that builds against ITK by<br>
specifying the '-std=c++11' flag beginning with the initial CMake<br>
configuration from a fresh build. By adding this flag, it is like<br>
specifying a different compiler, and there are some initial<br>
configuration try_compile tests that extract information about the<br>
compiler. Specify it with<br>
<br>
cmake -DCMAKE_CXX_FLAGS='std=c++11' ~/src/ITK<br>
<br>
HTH,<br>
Matt<br>
<div><div class="h5"><br>
On Wed, Apr 22, 2015 at 5:57 PM, Pol Monsó Purtí <<a href="mailto:lluna.nova@gmail.com">lluna.nova@gmail.com</a>> wrote:<br>
> Hello all,<br>
><br>
> Today I moved&updated the ITK directory so I had to rebuild everything. I am<br>
> compiling with -std=c++11<br>
><br>
> Misteriously, now I am getting the error<br>
><br>
> /Users/monso/code/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:437:68:<br>
> error: 'constexpr' needed for in-class initialization of static data member<br>
> 'const long double vnl_numeric_traits<long double>::maxval' of non-integral<br>
> type [-fpermissive]<br>
> static const long double maxval<br>
> VCL_STATIC_CONST_INIT_FLOAT_DECL(1.7976931348623157E+308);<br>
><br>
> which apparently it's a bug that was there around 2011. How come it came<br>
> back? Any ideas?<br>
><br>
> This is using the master branch of<br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK.git" target="_blank">https://github.com/InsightSoftwareConsortium/ITK.git</a><br>
><br>
> See <a href="http://public.kitware.com/pipermail/community/2013-December/004580.html" target="_blank">http://public.kitware.com/pipermail/community/2013-December/004580.html</a><br>
><br>
> I am on OSX, using g++-mp-4.9<br>
><br>
> I tried setting the vcl_include_cxx_0x, same result.<br>
><br>
> I don't know how I fixed this or if I had the issue (I kind of recall this),<br>
> but it worked before. So I tried with ITK4.7.1 from the website, same<br>
> result.<br>
><br>
> Cheers,<br>
><br>
> Pol<br>
><br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
><br>
</blockquote></div><br></div>