[ITK] ITK 4.7 + VTK 6.1 leads to "Undefined symbols for architecture x86_64"

Matt McCormick matt.mccormick at kitware.com
Tue Feb 24 11:16:05 EST 2015


Hi Quentan,

Is this the latest release of ITK?  What release of VTK is this?  If
not already attempted, please use ITK 4.7.1 or newer and VTK 6.2rc1 or
newer.

Thanks,
Matt

On Tue, Feb 24, 2015 at 10:56 AM, Quan Qi <quentan at gmail.com> wrote:
> Dear community members,
>
> I’m trying to read DICOM series with ITK and render the volume with VTK. The single use of VTK is able to render the volume, but once ITK is included, an “Undefined symbols for architecture x86_64” compilation error is produced:
>
> Undefined symbols for architecture x86_64:
>   "vtkRenderingOpenGL_AutoInit_Destruct()", referenced from:
>       vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in test1.cxx.o
> ...
>
> I’m running on OS X 10.10, I want to know how to adjust included libraries to avoid this errors?
>
> CMakeLists.txt
>
> #### CMakeLists.txt start
>
> cmake_minimum_required(VERSION 2.8.4)
> project(VolumeShow2)
>
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -std=c++11")
>
> find_package(ITK REQUIRED) # these 2 lines leads to the undefined symbols error
> include(${ITK_USE_FILE})
>
> find_package(VTK REQUIRED)
> include(${VTK_USE_FILE})
>
> add_executable(test1 MACOSX_BUNDLE test1.cxx)
>
> target_link_libraries(test1 ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES})
> # target_link_libraries(test1 ${VTK_LIBRARIES} ${ITK_LIBRARIES} vtkRenderingVolume vtkRenderingOpenGL vtkRenderingVolumeOpenGL) # this call helps the project pass the compilation, but leaves an error when executing: no override found for 'vtkRayCastImageDisplayHelper'.
>
> #### CMakeLists.txt end
>
> I am confused about the integration of ITK and VTK. Can anybody help me?
>
> Cheers,
> Quentan
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community


More information about the Community mailing list