[Insight-users] Compiling Error After upgrading MacOS and Xcode

Bradley Lowekamp brad at lowekamp.net
Tue Nov 5 11:25:41 EST 2013


The new compiler with OSX Maverics turns on C++11 by default. This needs to be explicitly disabled when configuring ITK <4.5

From a new directory, which has not been configured before run the following to perform an initial configuration:

cmake -DCMAKE_CXX_FLAGS:STRING='-stdlib=libstdc++ -std=c++03'  ../ITK

This with tell the compiler to use C++03 during the configuration and build. 

Many in the community are actively working to improve the C++11 support in ITK. You would need to checkout the master branch from the git repository to try out these new changes.

Good luck,
Brad

On Nov 5, 2013, at 10:46 AM, Jianxu Chen <jchen16 at nd.edu> wrote:

> Hello,
> 
> I am currently using ITK under Mac OS 10.9 and Xcode 5. And when I compiling a file including "ITKImageFileWrite", I got the following error.
> 
> ..../ITK/InsightToolkit/Modules/Core/Common/include/itkImageAlgorithm.h:24:12: fatal error:
>       'tr1/type_traits' file not found
> #  include <tr1/type_traits>
> 
> 
> Right before upgrading to Xcode 5 and Mac OS 10.9, the exactly same file worked without any problem. So I am wondering if there is any significant change in the new OS version, which induced above error. 
> 
> Could anyone help me out on this issue? Thanks in advance.
> 
> All the best,
> -- 
> Jianxu Chen
> Research Assistant
> Dept. of Computer Science and Engineering
> University of Notre Dame
> jchen16 at nd.edu
> 
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131105/bf342ffc/attachment.htm>


More information about the Insight-users mailing list