[ITK-users] About Compile ITK Ubuntu c++11

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Dec 4 08:33:22 EST 2014


Hello,

When CMake does it's initial configuration it does a bunch of try compiles. The correct compiler and language flags are needed when this initial configuration is done. I suggest starting with a completely empty directory, then do some thing like: cmake -DCMAKE_CXX_FLAGS=-std=c++11 ~/src/ITK This will ensure the flags are there for the initial configuration to correctly detect C++11 features.

Brad

On Dec 4, 2014, at 5:04 AM, Waldo Valenzuela via Insight-users <insight-users at itk.org> wrote:

> Hi Guys,
> 
> I have been using ITK on Mac and Windows for a while, but I started to do it on linux and I have some problems enabling c++11 feature.
> 
> On my Scientific Linux 7 machine, I didn’t have any problem to compile ITK adding CMAKE_CXX_FLAG= -std=gnu++11, but in a Ubuntu 14.04 machine with gcc 4.8.2, I have the error “constexpr needed” from the VNL library.
> 
> I know that this was a common error in the past with c++11, but I google it to solve it and couldn’t find any answer that really works.
> 
> There is a special configuration on CMAKE to solve this in Ubuntu?
> 
> Any help or guide is really welcome.
> 
> Cheers,
> 
> Waldo. 
> 
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users



More information about the Insight-users mailing list