[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 13:23:44 EST 2015


Hi Quentan,

Could you please share the full CMakeLists.txt?  Fixes in VTK 6.2rc1
should have fixed this issue.  Could you also please verify that CMake
is using the correct version of VTK?

Thanks,
Matt

PS.  Please keep messages on the list by using reply-to-all.

On Tue, Feb 24, 2015 at 12:20 PM, Quan Qi <quentan at gmail.com> wrote:
> Dear Matt,
>
> I tried once again using both the latest VTK (6.2.rc1) and ITK (4.7.1), but no improvement gained.
>
> However, I manually added more libraries in target_link_libraries, and it works. I wonder there is any conflict with simply include both ITK_LIBRARIES and VTK_LIBRARIES in volume rendering? Because the single use of VTK works, but ITK makes some VTK libraries unavailable and needs explicitly included.
>
> #### CMakeLists.txt snippet start
>
> target_link_libraries(test1 ${VTK_LIBRARIES} ${ITK_LIBRARIES}
>                       vtkRenderingVolume vtkRenderingOpenGL vtkRenderingVolumeOpenGL
>                       vtkInteractionStyle vtkRenderingFreeType vtkRenderingFreeTypeOpenGL)
>
> #### CMakeLists.txt snipped end
>
> Cheers,
> Quentan
>
>> On 24 Feb 2015, at 16:16, Matt McCormick <matt.mccormick at kitware.com> wrote:
>>
>> 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