[Insight-users] Linking error
Dora Szasz
dora.szasz at yahoo.com
Sun May 22 05:29:27 EDT 2011
Now, I've tried also to Build the example: WatershedSegmentation1.cxx from Segmentation folder of ITK, and I have the same linking error:
1>WatershedSegmentation1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::WatershedMiniPipelineProgressCommand::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf at WatershedMiniPipelineProgressCommand@itk@@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)
I have also built in the same way the examples ConnectedThresholdImageFilter.cxx and ConfidenceConnected.cxx and everything worked perfectly. I don't know why the linking error appear for some examples.
Thanks!
________________________________
From: Dora Szasz <dora.szasz at yahoo.com>
To: "insight-users at itk.org" <insight-users at itk.org>
Sent: Sunday, May 22, 2011 12:47 AM
Subject: Linking error
Hello!
I am trying to build the example: http://www.insight-journal.org/browse/publication/146 . I used cmake and visual studio to build the example, but when I'm trying to build it the following error appeared: 1>ImageExt.obj : error LNK2019: unresolved external symbol "public: class vtkImageData * __thiscall vtkKWImage::GetVTKImage(void)" (?GetVTKImage at vtkKWImage@@QAEPAVvtkImageData@@XZ) referenced in function __catch$_main$0
This is the CMakeLists.txt:
cmake_minimum_required(VERSION 2.6)
PROJECT (ImageExt)
FIND_PACKAGE( ITK )
IF ( ITK_FOUND )
INCLUDE( ${ITK_USE_FILE})
ENDIF( ITK_FOUND )
FIND_PACKAGE (VTK)
IF (VTK_FOUND)
INCLUDE ( ${USE_VTK_FILE})
ENDIF (VTK_FOUND)
INCLUDE_DIRECTORIES (${ImageExt_SOURCE_DIR})
ADD_EXECUTABLE( ImageExt ImageExt.cxx )
TARGET_LINK_LIBRARIES (ImageExt ITKBasicFilters ITKCommon ITKIO
vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO vtkFiltering vtkCommon)
I don't know how to solve this problem. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110522/188d6c85/attachment.htm>
More information about the Insight-users
mailing list