[Insight-users] Xiaoming: ITK library sharing problem
Luis Ibanez
luis.ibanez at kitware.com
Mon May 1 16:23:25 EDT 2006
Hi Yiming,
When you reinstalled ITK, did you put it in the same binary and source
directories as before ?
If not, then you have to reconfigure with CMake the binary directories
of all your projects that use ITK. You must tell these projects where
is ITK located now.
Also you mention:
> 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.
Building ITK should take only *15 minutes*.
The only way to get the build to take 3 hours is to enable all the
options of Examples, Testing and Wrapping for the three languages
Tcl, Python and Java.
Normally you *shouldn't* enable the Testing, unless you are intending
to contribute builds to the Dashboard.
Are you enabling any of the Wrappings ? (Python, Tcl or Java) ?
If so, Do you really need them ?
You may want to follow the build instructions given in the
ITK Tutorials:
http://www.itk.org/HTML/Tutorials.htm
in particular in:
http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html
and in the ITK Software Guide:
http://www.itk.org/ItkSoftwareGuide.pdf
Regards,
Luis
===================
yiming yin wrote:
> 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 <mailto:??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 <mailto:??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
> <mailto:?CreateInstance at ObjectFactoryBase@itk@@SA?AV?$SmartPointer at VLightObject@it>
> k@@@2 at PBD@Z <mailto:k@@@2 at PBD@Z>)" imported
> LINK : warning LNK4049: locally defined symbol ""void __cdecl
> itk::OutputWindowDisplayDebugText(char const *)"
> (?OutputWindowDisplayDebugText at itk@@YAXPBD at Z
> <mailto:?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
> <mailto:?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
> <mailto:?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 <mailto:??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
> <mailto:??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
> <mailto:??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
> <mailto:?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
> <mailto:?GetSource at DataObject@itk@@QBE?AV?$SmartPointerForwardReference at VProcessOb>
> ject at itk@@@2 at XZ <mailto: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 <mailto:??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
> <mailto:??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 <mailto:??6itk@@YAAAV?$basi>
> c_ostream at DU?$char_traits at D@std@@@std@@AAV12 at ABVIndent@0@@Z
> <mailto: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
> <mailto:?PrintSelf at Region@itk@@MBEXAAV?$basic_ostream at DU?$c>
> har_traits at D@std@@@std@@VIndent at 2@@Z
> <mailto: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
> <mailto:?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
> <mailto:?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
> <mailto:?PrintSelf at DataObject@itk@@MBEXAAV?$basic_ostre>
> am at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z
> <mailto: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
> <mailto:??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
> <mailto:?PrintSelf at Object@itk@@MBEXAAV?$basic_ostream at DU?$c>
> har_traits at D@std@@@std@@VIndent at 2@@Z
> <mailto: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
> <mailto:?Print at LightObject@itk@@QBEXAAV?$basic_ostream at DU?$char_trait>
> s at D@std@@@std@@VIndent at 2@@Z <mailto: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
> <mailto:??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
> <mailto:__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
> <mailto:__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 <mailto:__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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list