[Insight-users] Linker Errors

Luis Ibanez luis.ibanez at kitware.com
Tue, 09 Mar 2004 11:51:24 -0500


Hi Srivalli


The symbols that you are missing at link time
are defined in the ITK libraries


You just need to add "ITKCommon.lib" to your
list of libraries to link with.


Do you have a good reason for not using CMake
in order to configure your project  ?

You wouldn't be dealing with this elementary
problems if you were using CMake...


Regards,


    Luis



---------------------
valli gummadi wrote:

>  Hi All,
>   
>          I am working on Registration application. I downloaded newer version of itk. My Com Dll project is compiling and linking well and i could get the results. But, When i used the itk in Automation Server Project I am getting following linker errors.
> 
> Errors:
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::Region::Region(void)" (__imp_??0Region at itk at  at QAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::Region::Region(void)" (__imp_??0Region at itk at  at QAE at XZ)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::Region::Region(void)" (__imp_??0Region at itk at  at QAE at XZ)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall itk::ProcessObject::GetNumberOfOutputs(void)const " (__imp_?GetNumberOfOutputs at ProcessObject at itk at  at QBEIXZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall itk::ProcessObject::GetNumberOfOutputs(void)const " (__imp_?GetNumberOfOutputs at ProcessObject at itk at  at QBEIXZ)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall itk::ProcessObject::GetNumberOfOutputs(void)const " (__imp_?GetNumberOfOutputs at ProcessObject at itk at  at QBEIXZ)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class itk::MultiThreader * __thiscall itk::ProcessObject::GetMultiThreader(void)" (__imp_?GetMultiThreader at ProcessObject at itk at  at QAEPAVMultiThreader at 2 at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class itk::MultiThreader * __thiscall itk::ProcessObject::GetMultiThreader(void)" (__imp_?GetMultiThreader at ProcessObject at itk at  at QAEPAVMultiThreader at 2 at XZ)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class itk::MultiThreader * __thiscall itk::ProcessObject::GetMultiThreader(void)" (__imp_?GetMultiThreader at ProcessObject at itk at  at QAEPAVMultiThreader at 2 at XZ)
> ImageFunctions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall itk::ProcessObject::GetNumberOfInputs(void)const " (__imp_?GetNumberOfInputs at ProcessObject at itk at  at QBEIXZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall itk::ProcessObject::GetNumberOfInputs(void)const " (__imp_?GetNumberOfInputs at ProcessObject at itk at  at QBEIXZ)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall itk::ProcessObject::GetNumberOfInputs(void)const " (__imp_?GetNumberOfInputs at ProcessObject at itk at  at QBEIXZ)
> 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)
> itemplate.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) public: __thiscall itk::Region::Region(class Region::Region const &)" (__imp_??0Region at itk at  at QAE at ABV01 at  at Z)
> itemplate.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::Region::Region(class Region::Region const &)" (__imp_??0Region at itk at  at QAE at ABV01 at  at Z)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall itk::EventObject::EventObject(void)" (__imp_??0EventObject at itk at  at QAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall itk::EventObject::~EventObject(void)" (__imp_??1EventObject at itk at  at UAE 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: __thiscall itk::KernelFunction::KernelFunction(void)" (__imp_??0KernelFunction at itk at  at IAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall itk::KernelFunction::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (__imp_?Pr
> intSelf at KernelFunction 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)
> 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: void __thiscall itk::ProcessObject::ReleaseDataFlagOn(void)" (__imp_?ReleaseDataFlagOn at ProcessObject at itk at  at QAEXXZ)
> 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 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 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 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) public: __thiscall itk::Command::Command(void)" (__imp_??0Command at itk at  at QAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall itk::Command::~Command(void)" (__imp_??1Command at itk at  at UAE at XZ)
> IPServerDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::vector<class itk::SmartPointer<class itk::DataObject>,class std::allocator<class itk::SmartPointer<class itk::DataObject> > > & __thiscall itk::Pro
> cessObject::GetOutputs(void)" (__imp_?GetOutputs at ProcessObject at itk at  at QAEAAV?$vector at V?$SmartPointer at VDataObject at itk at  at  at itk at  at V?$allocator at V?$SmartPointer at VDataObject at itk at  at  at itk at  at  at std at  at  at std at  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 char const  itk::NumericTraits<char>::Zero" (__imp_?Zero 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)
> Debug/IPServer.exe : fatal error LNK1120: 36 unresolved externals
> Error executing link.exe.
> 
> Can anybody tell me the reason for these errors.
> 
> Thank you,
> Regards,
> Srivalli.