[Insight-users] Linking Errors
Luis Ibanez
luis.ibanez@kitware.com
Fri, 15 Mar 2002 11:17:40 -0500
Hi Dhananjay
The IO functionality in ITK is in an independent library:
ITKIO.lib
You may want to verify that you are linking with this library too.
Luis
===========================
Dhananjay Kulkarni wrote:
>Thanks to Peiter Vos for the suggestions.
>I am trying to write a simple thresholding example.
>
>I have used the ThresholdImageFilter but while writing the file, I get the
>following linking errors .
>
>My Code to Write is :
>
>
>.......
>itk::RawImageWriter<ImageType>::Pointer writer =
> itk::RawImageWriter<ImageType>::New();
> writer->SetFileName("output.pgm");
> writer->SetInput(threshold->GetOutput());
>
> writer->Write();
>
>...
>
>
>
>Linking errors are :::
>
>
>Compiling...
>main.cpp
>Linking...
>main.obj : error LNK2001: unresolved external symbol "public: virtual void
>__thiscall itk::Writer::Write(void)" (?Write@Writer@itk@@UAEXXZ)
>main.obj : error LNK2001: unresolved external symbol "protected: virtual
>__thiscall itk::Writer::~Writer(void)" (??1Writer@itk@@MAE@XZ)
>main.obj : error LNK2001: unresolved external symbol "protected: virtual
>void __thiscall itk::Writer::PrintSelf(class std::basic_ostream<char,struct
>std::char_traits<char> > &,class itk::Indent)const "
>(?PrintSelf@Writer@itk@@MBEXAAV?$basic_ostream@
>DU?$char_traits@D@std@@@std@@VIndent@2@@Z)
>main.obj : error LNK2001: unresolved external symbol "protected: __thiscall
>itk::Writer::Writer(void)" (??0Writer@itk@@IAE@XZ)
>Debug/ITKImageTest.exe : fatal error LNK1120: 4 unresolved externals
>Error executing link.exe.
>
>ITKImageTest.exe - 5 error(s), 0 warning(s)
>
>
>
>I have used the settings specified in the VC_Custom_project.doc and they are
>working except for this linking error.
>
>
>Please help.
>
>_______________________________________________
>Insight-users mailing list
>Insight-users@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-users
>