[Insight-users] Watershed Linker Error

Luis Ibanez luis.ibanez at kitware.com
Sat Aug 15 20:50:16 EDT 2009


Hi Michael,


You are missing to link with the ITKAlgorithms library.


The class: itkWatershedMiniPipelineProgressCommand

is defined in the file:

   Code/Algorithms/itkWatershedMiniPipelineProgressCommand.h

and makes part of the ITKAlgorithms library.


Simply add "ITKAlgorithms" to the TARGET_LINK_LIBRARY
command in your CMakeLists.txt file.

Something like:

ADD_EXECUTABLE(WatershedSegmentation1 WatershedSegmentation1.cxx )
TARGET_LINK_LIBRARIES(WatershedSegmentation1 ITKAlgorithms ITKIO)



     Regards,


            Luis


------------------------------------------
On Wed, Aug 12, 2009 at 8:34 AM, Michael Siegesmund <
TheSmashingPumpkin at web.de> wrote:

> Hi,
>
> I included the WatershedImageFilter in my project and created a watershed
> object. Now I get some linker errors from MSVS 2005. I already looked into
> the mailing-archive and added "/FORCE:MULTIPLE" to the linker options (to
> prevent linker errors) but nothing changed. Any idea how to solve the
> problem? (All other filters produce no linker errors - only watershed does.)
>
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
> #include "itkWatershedImageFilter.h"
>
> typedef itk::WatershedImageFilter<ScalarImageType> WatershedFilterType;
> WatershedFilterType::Pointer watershed = WatershedFilterType::New();
>
>
> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
> 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)
>  SimpleView4.obj
>
> error LNK2001: unresolved external symbol "public: virtual void __thiscall
> itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object const
> *,class itk::EventObject const &)"
> (?Execute at WatershedMiniPipelineProgressCommand@itk@@UAEXPBVObject at 2
> @ABVEventObject at 2@@Z)       SimpleView4.obj
>
> error LNK2001: unresolved external symbol "public: virtual void __thiscall
> itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object *,class
> itk::EventObject const &)" (?Execute at WatershedMiniPipelineProgressCommand
> @itk@@UAEXPAVObject at 2@ABVEventObject at 2@@Z)     SimpleView4.obj
>
> fatal error LNK1120: 3 unresolved externals     C:\Dokumente und
> Einstellungen\siegesmund\Desktop\Neuer Ordner\Test\Release\qtsimpleview.exe
>
>
>
> ________________________________________________________________
> Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
> für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090815/398dd742/attachment-0001.htm>


More information about the Insight-users mailing list