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

Matt McCormick matt.mccormick at kitware.com
Thu Oct 29 23:37:37 EDT 2015


Hi Michael,

>>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.

Where the same CMake variables used when building your codes?  All
these should be consistent throughout all compiled and linked code.

Hope this helps,
Matt


More information about the Insight-users mailing list