[ITK] [ITK-users] ITK 4.8.1, OS X 10.10 and C++11 Support

Sean McBride sean at rogue-research.com
Thu Oct 29 19:47:09 EDT 2015


On Thu, 29 Oct 2015 18:09:08 -0400, Michael Jackson said:

>I am getting the following compile error when I compile my codes against
>ITK 4.8.1
>
>/Users/Shared/DREAM3D_SDK/InsightToolkit-4.8.1/Modules/Core/Common/
>include/itkImageAlgorithm.h:26:12: fatal error: 'tr1/type_traits' file
>not found
>#  include <tr1/type_traits>
>
>I compiled ITK with C++ 11 support by initializing ITK’s CMake cache
>with the following values:
>
>
>  echo "CMAKE_CXX_STANDARD=11" >> $cacheFile
>  echo "CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON" >> $cacheFile
>  echo “CMAKE_OSX_DEPLOYMENT_TARGET=10.7" >> $cacheFile
>  echo "CMAKE_OSX_SYSROOT:Path=$OSX_SDK" >> $cacheFile
>  echo "CMAKE_CXX_FLAGS:STRING=-stdlib=libc++ -std=c++11 " >> cacheFile
>
>ITK seemed to compile and install but I only compiled the libraries and
>none of the tests.
>
>Has anyone ever had this issue? And what do I need to do to solve it.

IIRC libc++ on 10.7 is pretty limited in its c++11 support.  If you really want to use c++11 you'll probably have to increase your deployment target.  These days, I can't build several c++11 projects like clang itself and cppcheck on my 10.8 buildbot because it's c++11 support is too limited.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada
_____________________________________
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 Community mailing list