[Insight-users] Linking Errors
Dhananjay Kulkarni
dkulkarni@uh.edu
Fri, 15 Mar 2002 10:12:04 -0600
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.