[Insight-users] Re: Linker errors
Luis Ibanez
luis.ibanez at kitware.com
Fri, 05 Mar 2004 10:30:06 -0500
Hi Valli,
It looks like you compiled ITK with
shared libraries ON, didn't you ?
You probably have in your path the
directories of old and new ITK Dll's.
Please check your path, check where you
have old and new ITK builds, and check
your application with the "dependency walker"
tool that you can download for free from:
http://www.dependencywalker.com/
This tool will show you what are the DLLs
that your application is depending on.
Also make sure that you don't have simultaneously
Shared libraries and Static libraries. This is a
common mistake when people first build for Static
and then switch to Shared without cleaning the
binary three.
Regards,
Luis
-------------------------
valli gummadi wrote:
> Hi All,
>
> When i used new version of itk iam gettign the following linker errors. My application is working well with the older vesrion of itk.
> Can anybody tell me the reason.
>
> LINK : warning LNK4049: locally defined symbol ""protected: class itk::DataObject * __thiscall itk::ProcessObject::GetOutput(unsigned int)" (?GetOutput at ProcessObject at itk at at IAEPAVDataObject at 2 at I at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl itk::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent const &)" (??6itk at at YAAAV?$basi
> c_ostream at DU?$char_traits at D at std at at at std at at AAV12 at ABVIndent at 0 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::Region::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf at Region at itk at at MBEXAAV?$basic_ostream at DU?$c
> har_traits at D at std at at at std at at VIndent at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static void __cdecl itk::LightObject::operator delete(void *)" (??3LightObject at itk at at SAXPAX at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::SetNumberOfRequiredInputs(unsigned int)" (?SetNumberOfRequiredInputs at ProcessObject at itk at at MAEXI at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static void * __cdecl itk::LightObject::operator new(unsigned int)" (??2LightObject at itk at at SAPAXI at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual __thiscall itk::ProcessObject::~ProcessObject(void)" (??1ProcessObject at itk at at MAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""void __cdecl itk::OutputWindowDisplayDebugText(char const *)" (?OutputWindowDisplayDebugText at itk at at YAXPBD at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static bool __cdecl itk::Object::GetGlobalWarningDisplay(void)" (?GetGlobalWarningDisplay at Object at itk at at SA_NXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: bool __thiscall itk::Object::GetDebug(void)const " (?GetDebug at Object at itk at at QBE_NXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual __thiscall itk::DataObject::~DataObject(void)" (??1DataObject at itk at at MAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: virtual void __thiscall itk::DataObject::Initialize(void)" (?Initialize at DataObject at itk at at UAEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall itk::ExceptionObject::~ExceptionObject(void)" (??1ExceptionObject at itk at at UAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: void __thiscall itk::ExceptionObject::UpdateWhat(void)" (?UpdateWhat at ExceptionObject at itk at at IAEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""const itk::ExceptionObject::`vftable'" (??_7ExceptionObject at itk at at 6B at )" imported
> LINK : warning LNK4049: locally defined symbol ""public: class itk::SmartPointerForwardReference<class itk::ProcessObject> __thiscall itk::DataObject::GetSource(void)const " (?GetSource at DataObject at itk at at QBE?AV?$SmartPointerForwardReference at VProcessO
> bject at itk at at at 2 at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: class itk::Indent __thiscall itk::Indent::GetNextIndent(void)" (?GetNextIndent at Indent at itk at at QAE?AV12 at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::DataObject::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf at DataObject at itk at at MBEXAAV?$basic_ostre
> am at DU?$char_traits at D at std at at at std at at VIndent at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: __thiscall itk::ExceptionObject::ExceptionObject(char const *,unsigned int,char const *,char const *)" (??0ExceptionObject at itk at at QAE at PBDI00 at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: __thiscall itk::ExceptionObject::ExceptionObject(class ExceptionObject::ExceptionObject const &)" (??0ExceptionObject at itk at at QAE at ABV01 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: __thiscall itk::Object::Object(void)" (??0Object at itk at at IAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::Object::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf at Object at itk at at MBEXAAV?$basic_ostream at DU?$c
> har_traits at D at std at at at std at at VIndent at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual __thiscall itk::Object::~Object(void)" (??1Object at itk at at MAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static class itk::SmartPointer<class itk::LightObject> __cdecl itk::ObjectFactoryBase::CreateInstance(char const *)" (?CreateInstance at ObjectFactoryBase at itk at at SA?AV?$SmartPointer at VLightObject at i
> tk at at at 2 at PBD at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::LightObject::Print(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?Print at LightObject at itk at at QBEXAAV?$basic_ostream at DU?$char_traits at D at std at at at std at at at Z)
> " imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::MultiThreader::SingleMethodExecute(void)" (?SingleMethodExecute at MultiThreader at itk at at QAEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::MultiThreader::SetSingleMethod(unsigned long (__stdcall*)(void *),void *)" (?SetSingleMethod at MultiThreader at itk at at QAEXP6GKPAX at Z0 at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::SetNthInput(unsigned int,class itk::DataObject *)" (?SetNthInput at ProcessObject at itk at at MAEXIPAVDataObject at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf at ProcessObject at itk at at MBEXAAV?$basic
> _ostream at DU?$char_traits at D at std at at at std at at VIndent at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: class itk::DataObject * __thiscall itk::ProcessObject::GetInput(unsigned int)" (?GetInput at ProcessObject at itk at at IAEPAVDataObject at 2 at I at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::GenerateInputRequestedRegion(void)" (?GenerateInputRequestedRegion at ProcessObject at itk at at MAEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""void __cdecl itk::OutputWindowDisplayWarningText(char const *)" (?OutputWindowDisplayWarningText at itk at at YAXPBD at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::ProcessObject::UpdateProgress(float)" (?UpdateProgress at ProcessObject at itk at at QAEXM at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: __thiscall itk::DataObject::DataObject(void)" (??0DataObject at itk at at IAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::SetNthOutput(unsigned int,class itk::DataObject *)" (?SetNthOutput at ProcessObject at itk at at MAEXIPAVDataObject at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: __thiscall itk::ProcessObject::ProcessObject(void)" (??0ProcessObject at itk at at IAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: class itk::MetaDataDictionary & __thiscall itk::Object::GetMetaDataDictionary(void)" (?GetMetaDataDictionary at Object at itk at at QAEAAVMetaDataDictionary at 2 at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::GenerateOutputInformation(void)" (?GenerateOutputInformation at ProcessObject at itk at at MAEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::Object::SetMetaDataDictionary(class itk::MetaDataDictionary const &)" (?SetMetaDataDictionary at Object at itk at at QAEXABVMetaDataDictionary at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: class itk::MetaDataDictionary const & __thiscall itk::Object::GetMetaDataDictionary(void)const " (?GetMetaDataDictionary at Object at itk at at QBEABVMetaDataDictionary at 2 at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: unsigned int __thiscall itk::DataObject::GetSourceOutputIndex(void)const " (?GetSourceOutputIndex at DataObject at itk at at QBEIXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::GenerateOutputRequestedRegion(class itk::DataObject *)" (?GenerateOutputRequestedRegion at ProcessObject at itk at at MAEXPAVDataObject at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::Object::InvokeEvent(class itk::EventObject const &)" (?InvokeEvent at Object at itk at at QAEXABVEventObject at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""const itk::EventObject::`vftable'" (??_7EventObject at itk at at 6B at )" imported
> LINK : warning LNK4049: locally defined symbol ""public: virtual unsigned long __thiscall itk::Object::GetMTime(void)const " (?GetMTime at Object at itk at at UBEKXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::DataObject::DisconnectPipeline(void)const " (?DisconnectPipeline at DataObject at itk at at QBEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: unsigned long __thiscall itk::Object::AddObserver(class itk::EventObject const &,class itk::Command *)" (?AddObserver at Object at itk at at QAEKABVEventObject at 2 at PAVCommand at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: class itk::SmartPointer<class itk::MetaDataObjectBase> & __thiscall itk::MetaDataDictionary::operator[](class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
> const &)" (??AMetaDataDictionary at itk at at QAEAAV?$SmartPointer at VMetaDataObjectBase at itk at at at 1 at ABV?$basic_string at DU?$char_traits at D at std at at V?$allocator at D at 2 at at std at at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: bool __thiscall itk::MetaDataDictionary::HasKey(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?HasKey at MetaDataDictionary at itk at at QAE_NABV?$bas
> ic_string at DU?$char_traits at D at std at at V?$allocator at D at 2 at at std at at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall itk::InvalidRequestedRegionError::~InvalidRequestedRegionError(void)" (??1InvalidRequestedRegionError at itk at at UAE at XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: __thiscall itk::InvalidRequestedRegionError::InvalidRequestedRegionError(class InvalidRequestedRegionError::InvalidRequestedRegionError const &)" (??0InvalidRequestedRegionError at itk at at QAE at ABV01
> at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: void __thiscall itk::DataObjectError::SetDataObject(class itk::DataObject *)" (?SetDataObject at DataObjectError at itk at at QAEXPAVDataObject at 2 at at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: __thiscall itk::InvalidRequestedRegionError::InvalidRequestedRegionError(char const *,unsigned int)" (??0InvalidRequestedRegionError at itk at at QAE at PBDI at Z)" imported
> LINK : warning LNK4049: locally defined symbol ""public: virtual void __thiscall itk::Object::Modified(void)const " (?Modified at Object at itk at at UBEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""public: virtual void __thiscall itk::DataObject::Update(void)" (?Update at DataObject at itk at at UAEXXZ)" imported
> LINK : warning LNK4049: locally defined symbol ""protected: virtual void __thiscall itk::ProcessObject::SetNumberOfRequiredOutputs(unsigned int)" (?SetNumberOfRequiredOutputs at ProcessObject at itk at at MAEXI at Z)" imported
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::ProgressReporter::~ProgressReporter(void)" (__imp_??1ProgressReporter at itk at at QAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::ProgressReporter::~ProgressReporter(void)" (__imp_??1ProgressReporter at itk at at QAE at XZ)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::ProgressReporter::~ProgressReporter(void)" (__imp_??1ProgressReporter at itk at at QAE at XZ)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall itk::ProgressReporter::CompletedPixel(void)" (__imp_?CompletedPixel at ProgressReporter at itk at at QAEXXZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall itk::ProgressReporter::CompletedPixel(void)" (__imp_?CompletedPixel at ProgressReporter at itk at at QAEXXZ)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::ProgressReporter::ProgressReporter(class ProgressReporter::ProcessObject *,int,unsigned long,unsigned long,float,float)" (__imp_??0Progress
> Reporter at itk at at QAE at PAVProcessObject at 1 at HKKMM at Z)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::ProgressReporter::ProgressReporter(class ProgressReporter::ProcessObject *,int,unsigned long,unsigned long,float,float)" (__imp_??0ProgressRep
> orter at itk at at QAE at PAVProcessObject at 1 at HKKMM at Z)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::ProgressReporter::ProgressReporter(class ProgressReporter::ProcessObject *,int,unsigned long,unsigned long,float,float)" (__imp_??0ProgressRepor
> ter at itk at at QAE at PAVProcessObject at 1 at HKKMM at Z)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall itk::EquivalencyTable::Flatten(void)" (__imp_?Flatten at EquivalencyTable at itk at at QAEXXZ)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall itk::EquivalencyTable::Add(unsigned long,unsigned long)" (__imp_?Add at EquivalencyTable at itk at at QAE_NKK at Z)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned long __thiscall itk::EquivalencyTable::Lookup(unsigned long)const " (__imp_?Lookup at EquivalencyTable at itk at at QBEKK at Z)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned long const itk::NumericTraits<unsigned long>::Zero" (__imp_?Zero at ?$NumericTraits at K at itk at at 2KB)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class itk::SmartPointer<class itk::EquivalencyTable> __cdecl itk::EquivalencyTable::New(void)" (__imp_?New at EquivalencyTable at itk at at SA?AV?$SmartPointe
> r at VEquivalencyTable at itk at at at 2 at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const itk::Region::`vftable'" (__imp_??_7Region at itk at at 6B at )
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const itk::Region::`vftable'" (__imp_??_7Region at itk at at 6B at )
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall itk::ProgressAccumulator::RegisterInternalFilter(class itk::ProcessObject *,float)" (__imp_?RegisterInternalFilter at ProgressAccumulator at itk at at QA
> EXPAVProcessObject at 2 at M at Z)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class itk::SmartPointer<class itk::ProgressAccumulator> __cdecl itk::ProgressAccumulator::New(void)" (__imp_?New at ProgressAccumulator at itk at at SA?AV?$Smart
> Pointer at VProgressAccumulator at itk at at at 2 at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static double const itk::NumericTraits<double>::Zero" (__imp_?Zero at ?$NumericTraits at N at itk at at 2NB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static double const itk::NumericTraits<double>::Zero" (__imp_?Zero at ?$NumericTraits at N at itk at at 2NB)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual __thiscall itk::KernelFunction::~KernelFunction(void)" (__imp_??1KernelFunction at itk at at MAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const itk::NumericTraits<unsigned short>::Zero" (__imp_?Zero at ?$NumericTraits at G at itk at at 2GB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const itk::NumericTraits<unsigned short>::Zero" (__imp_?Zero at ?$NumericTraits at G at itk at at 2GB)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char const itk::NumericTraits<unsigned char>::Zero" (__imp_?Zero at ?$NumericTraits at E at itk at at 2EB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char const itk::NumericTraits<unsigned char>::Zero" (__imp_?Zero at ?$NumericTraits at E at itk at at 2EB)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static short const itk::NumericTraits<short>::Zero" (__imp_?Zero at ?$NumericTraits at F at itk at at 2FB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static short const itk::NumericTraits<short>::Zero" (__imp_?Zero at ?$NumericTraits at F at itk at at 2FB)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static float const itk::NumericTraits<float>::Zero" (__imp_?Zero at ?$NumericTraits at M at itk at at 2MB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static float const itk::NumericTraits<float>::Zero" (__imp_?Zero at ?$NumericTraits at M at itk at at 2MB)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: __thiscall itk::MetaDataObjectBase::MetaDataObjectBase(void)" (__imp_??0MetaDataObjectBase at itk at at IAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall itk::MetaDataObjectBase::Print(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (__imp_?Print at MetaDataObjectBas
> e at itk at at UBEXAAV?$basic_ostream at DU?$char_traits at D at std at at at std at at at Z)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual __thiscall itk::MetaDataObjectBase::~MetaDataObjectBase(void)" (__imp_??1MetaDataObjectBase at itk at at MAE at XZ)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static long const itk::NumericTraits<long>::Zero" (__imp_?Zero at ?$NumericTraits at J at itk at at 2JB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned char const itk::NumericTraits<unsigned char>::One" (__imp_?One at ?$NumericTraits at E at itk at at 2EB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static char const itk::NumericTraits<char>::One" (__imp_?One at ?$NumericTraits at D at itk at at 2DB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static short const itk::NumericTraits<short>::One" (__imp_?One at ?$NumericTraits at F at itk at at 2FB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const itk::NumericTraits<unsigned short>::One" (__imp_?One at ?$NumericTraits at G at itk at at 2GB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static float const itk::NumericTraits<float>::One" (__imp_?One at ?$NumericTraits at M at itk at at 2MB)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static char const itk::NumericTraits<char>::Zero" (__imp_?Zero at ?$NumericTraits at D at itk at at 2DB)
> Release/IPServer.exe : fatal error LNK1120: 27 unresolved externals
> Error executing link.exe.
> Creating browse info file...
>
> IPServer.exe - 39 error(s), 61 warning(s)
>
>
> Thanks,
> Regards,
> Srivalli.