[Insight-users] build problem with QuickViewer and ItkVtkGlue
Lee Periolat
periolat at gmail.com
Sun May 6 23:23:10 EDT 2012
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
More information about the Insight-users
mailing list