[Insight-users] Xiaoming: ITK library sharing problem

yiming yin yimingyinster at gmail.com
Mon May 1 15:11:08 EDT 2006


Hello,
           Due to a computer crash. I had to reinstall ITK on my PC. I have
configured the "CMakeList.txt" and compiled ITK.dsw under C:\Insight
directory. However, I haven't been able to compile "helloworld" since the
new installation of the ITK. I suspect it has to do with the fact that CMake
automatically default to Library Sharing as OFF. So when I generate my
ITK.dsw, the library was sharing somehow. But I can be wrong, anyhow, this
is the error that I get in trying to build "helloworld.cxx":


--------------------Configuration: HelloWorld - Win32
Debug--------------------
Linking...
LINK : warning LNK4049: locally defined symbol ""public: static void __cdecl
itk::LightObject::operator delete(void *)" (??3LightObject at itk@@SAXPAX at Z)"
imported
LINK : warning LNK4049: locally defined symbol ""public: static void *
__cdecl itk::LightObject::operator new(unsigned int)" (
??2LightObject at itk@@SAPAXI at Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: static class
itk::SmartPointer<class itk::LightObject> __cdecl
itk::ObjectFactoryBase::CreateInstance(char const *)" (
?CreateInstance at ObjectFactoryBase@itk@@SA?AV?$SmartPointer at VLightObject@it
k@@@2 at PBD@Z)" imported
LINK : warning LNK4049: locally defined symbol ""void __cdecl
itk::OutputWindowDisplayDebugText(char const *)" (
?OutputWindowDisplayDebugText at itk@@YAXPBD at Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: static bool __cdecl
itk::Object::GetGlobalWarningDisplay(void)" (
?GetGlobalWarningDisplay at Object@itk@@SA_NXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: bool __thiscall
itk::Object::GetDebug(void)const " (?GetDebug at Object@itk@@QBE_NXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall
itk::ExceptionObject::~ExceptionObject(void)" (
??1ExceptionObject at itk@@UAE at XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall
itk::ExceptionObject::ExceptionObject(class itk::ExceptionObject const &)" (
??0ExceptionObject at itk@@QAE at ABV01@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall
itk::ExceptionObject::ExceptionObject(char const *,unsigned int,char const
*,char const *)" (??0ExceptionObject at itk@@QAE at PBDI00@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual void
__thiscall itk::DataObject::CopyInformation(class itk::DataObject const *)"
(?CopyInformation at DataObject@itk@@UAEXPBV12@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: class
itk::SmartPointerForwardReference<class itk::ProcessObject> __thiscall
itk::DataObject::GetSource(void)const " (
?GetSource at DataObject@itk@@QBE?AV?$SmartPointerForwardReference at VProcessOb
ject at itk@@@2 at XZ)" imported
LINK : warning LNK4049: locally defined symbol ""protected: virtual
__thiscall itk::DataObject::~DataObject(void)" (??1DataObject at itk@@MAE at XZ)"
imported
LINK : warning LNK4049: locally defined symbol ""protected: __thiscall
itk::DataObject::DataObject(void)" (??0DataObject at itk@@IAE at XZ)" 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@@YAAAV?$basi
c_ostream at DU?$char_traits at D@std@@@std@@AAV12 at ABVIndent@0@@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@itk@@MBEXAAV?$basic_ostream at DU?$c
har_traits at D@std@@@std@@VIndent at 2@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual void
__thiscall itk::DataObject::Initialize(void)" (
?Initialize at DataObject@itk@@UAEXXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: class itk::Indent
__thiscall itk::Indent::GetNextIndent(void)" (
?GetNextIndent at Indent@itk@@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@itk@@MBEXAAV?$basic_ostre
am at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""protected: __thiscall
itk::Object::Object(void)" (??0Object at itk@@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@itk@@MBEXAAV?$basic_ostream at DU?$c
har_traits at D@std@@@std@@VIndent at 2@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall
itk::LightObject::Print(class std::basic_ostream<char,struct
std::char_traits<char> > &,class itk::Indent)const " (
?Print at LightObject@itk@@QBEXAAV?$basic_ostream at DU?$char_trait
s at D@std@@@std@@VIndent at 2@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""protected: virtual
__thiscall itk::Object::~Object(void)" (??1Object at itk@@MAE at XZ)" imported
HelloWorld.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: virtual __thiscall
itk::Region::~Region(void)" (__imp_??1Region at itk@@UAE at XZ)
HelloWorld.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static double const
itk::NumericTraits<double>::Zero" (__imp_?Zero@?$NumericTraits at N@itk@@2NB)
HelloWorld.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: __thiscall itk::Region::Region(void)" (
__imp_??0Region at itk@@QAE at XZ)
Debug/HelloWorld.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

ALL_BUILD - 4 error(s), 22 warning(s)





I am wondering how may I go about remedy this problem without re-installing
or rebuilding ITK.dsw again, which would take 3 hours to build. Thank you.

Xiaoming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060501/a323747a/attachment.htm


More information about the Insight-users mailing list