<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Matt,<div class=""><br class=""></div><div class="">It's weird that I cannot pass compilation yesterday but get no error now… I’m running on ITK 4.7.1 and VTK 6.2.rc1.</div><div class=""><br class=""></div><div class="">But any way I post the CMakeLists.txt here, and I shared the simple rendering on GitHub: <a href="https://github.com/quentan/DICOM_ITK_VTK" class="">https://github.com/quentan/DICOM_ITK_VTK</a></div><div class=""><br class=""></div><div class="">```</div><div class="">#### CMakeLists.txt start</div><div class=""><br class=""></div><div class=""><div class="">cmake_minimum_required(VERSION 2.8.4)</div><div class="">project(TEST)</div><div class=""><br class=""></div><div class="">set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -std=c++11")</div><div class=""><br class=""></div><div class="">find_package(ITK REQUIRED)</div><div class="">include(${ITK_USE_FILE})</div><div class=""><br class=""></div><div class="">find_package(VTK REQUIRED)</div><div class="">include(${VTK_USE_FILE})</div><div class=""><br class=""></div><div class="">add_executable(test1 MACOSX_BUNDLE main.cxx)</div><div class=""><br class=""></div><div class="">target_link_libraries(test1 ${VTK_LIBRARIES} ${ITK_LIBRARIES})</div><div class=""># If the simple include of VTK_LIBRARIES and ITK_LIBRARIES gives "Undefined symbols for architecture x86_64" error. Then include some other VTK libraries explicitly as shown below.</div><div class=""># target_link_libraries(test1 ${VTK_LIBRARIES} ${ITK_LIBRARIES} vtkRenderingVolume vtkRenderingOpenGL vtkRenderingVolumeOpenGL vtkInteractionStyle vtkRenderingFreeType vtkRenderingFreeTypeOpenGL)</div></div><div class=""><br class=""></div><div class="">#### CMakeLists.txt end</div><div class="">```</div><div class=""><br class=""></div><div class="">Another issue is a warning about redefined macro when compiling. Is there any redefinition in both ITK and VTK?</div><div class=""><br class=""></div><div class="">```</div><div class="">#### Warning information start</div><div class=""><div class="">[100%] Building CXX object CMakeFiles/test1.dir/main.cxx.o</div><div class="">In file included from <built-in>:188:</div><div class=""><command line>:4:9: warning: 'vtkRenderingCore_AUTOINIT' macro redefined</div><div class="">#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)</div><div class=""> ^</div><div class=""><command line>:3:9: note: previous definition is here</div><div class="">#define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)</div><div class=""> ^</div><div class="">1 warning generated.</div><div class="">Linking CXX executable test1.app/Contents/MacOS/test1</div><div class="">[100%] Built target test1</div></div><div class=""><br class=""></div><div class=""><div class="">#### Warning information end</div><div class=""></div></div><div class="">```</div><div class=""><br class=""></div><div class="">Cheers, </div><div class="">Quentan</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Feb 2015, at 18:23, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Hi Quentan,<br class=""><br class="">Could you please share the full CMakeLists.txt? Fixes in VTK 6.2rc1<br class="">should have fixed this issue. Could you also please verify that CMake<br class="">is using the correct version of VTK?<br class=""><br class="">Thanks,<br class="">Matt<br class=""><br class="">PS. Please keep messages on the list by using reply-to-all.<br class=""><br class="">On Tue, Feb 24, 2015 at 12:20 PM, Quan Qi <<a href="mailto:quentan@gmail.com" class="">quentan@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">Dear Matt,<br class=""><br class="">I tried once again using both the latest VTK (6.2.rc1) and ITK (4.7.1), but no improvement gained.<br class=""><br class="">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.<br class=""><br class="">#### CMakeLists.txt snippet start<br class=""><br class="">target_link_libraries(test1 ${VTK_LIBRARIES} ${ITK_LIBRARIES}<br class=""> vtkRenderingVolume vtkRenderingOpenGL vtkRenderingVolumeOpenGL<br class=""> vtkInteractionStyle vtkRenderingFreeType vtkRenderingFreeTypeOpenGL)<br class=""><br class="">#### CMakeLists.txt snipped end<br class=""><br class="">Cheers,<br class="">Quentan<br class=""><br class=""><blockquote type="cite" class="">On 24 Feb 2015, at 16:16, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:<br class=""><br class="">Hi Quentan,<br class=""><br class="">Is this the latest release of ITK? What release of VTK is this? If<br class="">not already attempted, please use ITK 4.7.1 or newer and VTK 6.2rc1 or<br class="">newer.<br class=""><br class="">Thanks,<br class="">Matt<br class=""><br class="">On Tue, Feb 24, 2015 at 10:56 AM, Quan Qi <<a href="mailto:quentan@gmail.com" class="">quentan@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">Dear community members,<br class=""><br class="">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:<br class=""><br class="">Undefined symbols for architecture x86_64:<br class=""> "vtkRenderingOpenGL_AutoInit_Destruct()", referenced from:<br class=""> vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in test1.cxx.o<br class="">...<br class=""><br class="">I’m running on OS X 10.10, I want to know how to adjust included libraries to avoid this errors?<br class=""><br class="">CMakeLists.txt<br class=""><br class="">#### CMakeLists.txt start<br class=""><br class="">cmake_minimum_required(VERSION 2.8.4)<br class="">project(VolumeShow2)<br class=""><br class="">set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -std=c++11")<br class=""><br class="">find_package(ITK REQUIRED) # these 2 lines leads to the undefined symbols error<br class="">include(${ITK_USE_FILE})<br class=""><br class="">find_package(VTK REQUIRED)<br class="">include(${VTK_USE_FILE})<br class=""><br class="">add_executable(test1 MACOSX_BUNDLE test1.cxx)<br class=""><br class="">target_link_libraries(test1 ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES})<br class=""># 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'.<br class=""><br class="">#### CMakeLists.txt end<br class=""><br class="">I am confused about the integration of ITK and VTK. Can anybody help me?<br class=""><br class="">Cheers,<br class="">Quentan<br class="">_______________________________________________<br class="">Community mailing list<br class=""><a href="mailto:Community@itk.org" class="">Community@itk.org</a><br class="">http://public.kitware.com/mailman/listinfo/community<br class=""></blockquote></blockquote><br class=""></blockquote></div></blockquote></div><br class=""></div></body></html>