[ITK] 'type_traits' file not found error, on OS X 10.10 and ITK 4.7.1

Quan Qi quentan at gmail.com
Mon Feb 23 14:10:23 EST 2015


Dear mailing list members,

I’m running on OS X 10.10 and have successfully compiled ITK 4.7.1(using shared library setting). But I always got a ‘type_traits’ error.

/usr/local/itk/include/ITK-4.7/itkImageAlgorithm.h:24:12: fatal error: 'type_traits' file not found

My CMakeLists.txt is quite simple:

#####
cmake_minimum_required(VERSION 2.8.4)
project(DicomSeriesReadImageWrite2)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -std=c++11")

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

set(SOURCE_FILES main.cpp)
add_executable(DicomSeriesReadImageWrite2 ${SOURCE_FILES})
#####

Change the stdlib to be libc++ leads to this error: Undefined symbols for architecture x86_64

I tried to search the same problem in mailing list archive, but issue remains. And I referred to this post <http://avansp.github.io/build/2014/10/30/building-ITK-4.7-on-macosx-10.9.5/>, but ’tr1/type_traits’ error was generated.

I’m new on ITK, can anybody help me?

Cheers,
Quentan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150223/a95e5f81/attachment.html>


More information about the Community mailing list