[Insight-users] build problem with QuickViewer and ItkVtkGlue

Lee Periolat periolat at gmail.com
Mon May 7 15:49:51 EDT 2012


Bill,
Thank you very much for your help.

I tried rebuilding ITK with Module_ITKVtkGlue set, and that worked
fine.  My app now finds "QuickView.h" in ITK.

However, the same error is occurs when I try to build... "unresolved
external symbol" (see below)
Lee

On Mon, May 7, 2012 at 5:29 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Lee,
>
> I have been making some changes to ItkVtkGlue on the Wiki. It's
> possible something is out of sync. I won't have a chance to look at it
> today.
>
> However, QuickView is included with ITK4.1. You can enable it by turning
> Module_ITKVtkGlue:BOOL=ON in cmake. After pointing to your VTK_DIR, rebuild ITK.
>
> Then you can remove the Find(ItkVtkGlue) from your app's cmake file.
>
> If you can wait, I'll try to look at your issue tomorrow.
>
> Bill
>
> On Sun, May 6, 2012 at 11:23 PM, Lee Periolat <periolat at gmail.com> wrote:
>> Hello,
>>
>> I am having trouble building my app that uses QuickViewer and ItkVtkGlue.
>>
>> I have downloaded and built ItkVtkGlue using CMake 2.8.7 and Microsoft
>> Visual Studio 2010 on Windows 7 Professional.  I am using ITK version
>> 4.1.0, and I have tried VTK versions 5.8 and 5.10
>>
>> The lines I added to my application are:
>>
>> #include "QuickView.h"
>>
>> // App that processes image
>>
>> QuickView viewer;
>> viewer.AddImage<InputImageType>(
>>                inputImage,true,
>>                itksys::SystemTools::GetFilenameName(outputImagePath));
>> // I haven't added the "Visualize()" line yet
>>
>> Here is the build error I get:
>>
>> 2>ClCompile:
>> 2>  SegmentationApp3d.cxx
>> 2>Link:
>> 2>     Creating library
>> C:/InsightToolkit-4.1.0/SegmentationApp3d/Binaries/Release/SegmentationApp3d.lib
>> and object C:/InsightToolkit-4.1.0/SegmentationApp3d/Binaries/Release/SegmentationApp3d.exp
>> 2>SegmentationApp3d.obj : error LNK2019: unresolved external symbol
>> "public: void __thiscall QuickView::AddImage<class itk::Image<short,3>
>>>(class itk::Image<short,3> *,bool,class std::basic_string<char,struct
>> std::char_traits<char>,class std::allocator<char> >)"
>> (??$AddImage at V?$Image at F$02 at itk@@@QuickView@@QAEXPAV?$Image at F$02 at itk@@_NV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z)
>> referenced in function _main
>> 2>C:\InsightToolkit-4.1.0\SegmentationApp3d\Binaries\Release\SegmentationApp3d.exe
>> : fatal error LNK1120: 1 unresolved externals
>> 2>
>> 2>Build FAILED.
>>
>> Here is my CMakeLists.txt file:
>>
>> # This is the root ITK CMakeLists file.
>> cmake_minimum_required(VERSION 2.4)
>> if(COMMAND CMAKE_POLICY)
>>  cmake_policy(SET CMP0003 NEW)
>> endif(COMMAND CMAKE_POLICY)
>>
>>
>> # This project is designed to be built outside the Insight source tree.
>> project(SegmentationApp3d)
>>
>> # Find ITK.
>> find_package(ITK REQUIRED)
>> include(${ITK_USE_FILE})
>>
>> # Find ITKVTKGlue
>> find_package(ItkVtkGlue REQUIRED)
>> include(${ItkVtkGlue_USE_FILE})
>>
>> add_executable(SegmentationApp3d  SegmentationApp3d.cxx)
>>
>> target_link_libraries(SegmentationApp3d ItkVtkGlue ${ITK_LIBRARIES}
>> ${VTK_LIBRARIES})
>>
>>
>> Any ideas what I am missing?  Many thanks in advance,
>> Lee
>> _____________________________________
>> 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
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com


More information about the Insight-users mailing list