[Insight-developers] Getting Linker Errors
Uma Sindhura
usindhura at yahoo.com
Sat Dec 17 09:22:05 EST 2005
Hi Friends,
Iam using VC++ extension .DLL.In which I am using ITKWaterShedImageFilter for the segmentation.Iam setting the Project Settins as Follows:
Project Settings:
General Tab : Use MFC in a Static Library
C/C++ Tab: Code Generation\Debug MultiThreaded
I was getting the following error
fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
Then I specified
C/C++ Tab: Code Generation\Debug MultiThreaded DLL
or
General Tab : Use MFC in a Static Library C/C++ Tab: Code Generation\Debug MultiThreaded
For the above two settings I was getting the following errors
Linking...
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_strin
g at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(vo
id)const " (?str@?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBE?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@2 at XZ) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(bool)" (??6?$basic_ostream at DU?$char_traits at D@std@@@st
d@@QAEAAV01 at _N@Z) already defined in itkcommon.lib(itkProcessObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(void const *)" (??6?$basic_ostream at DU?$char_traits at D@
std@@@std@@QAEAAV01 at PBX@Z) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream at DU?$char_traits at D@std@@@std
@@QAEAAV01 at H@Z) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??6std@@YAAAV?$basic_ostream at DU?$cha
r_traits at D@std@@@0 at AAV10@PBD at Z) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios at DU?$char_traits at D@std@@@std@@UAE at XZ) already defined
in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??0?
$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at H@Z) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios at DU?$char_traits at D@std@@@std@@IAE at XZ) already defined in itk
common.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(vo
id)" (??1?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@UAE at XZ) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (??6?$basic_ostream at DU?$char_traits at D@std@@@s
td@@QAEAAV01 at M@Z) already defined in itkcommon.lib(itkProcessObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned int)" (??6?$basic_ostream at DU?$char_traits at D@
std@@@std@@QAEAAV01 at I@Z) already defined in itkcommon.lib(itkLightObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (??6?$basic_ostream at DU?$char_traits at D
@std@@@std@@QAEAAV01 at K@Z) already defined in itkcommon.lib(itkObject.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char,s
truct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ABV?$allocator at D@1@@Z) already defined in itkcommon.lib(itkLightObject.obj)
libcpmt.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet at locale@std@@QBEPBVfacet at 12@I_N at Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(locale0.obj) : error LNK2005: "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc at locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init at locale@std@@CAPAV_Locimp at 12@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(ios.obj) : error LNK2005: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear at ios_base@std@@QAEXH_N at Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(ios.obj) : error LNK2005: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base at std@@UAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init at ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(iostream.obj) : error LNK2005: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init at ios_base@std@@QAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(iostream.obj) : error LNK2005: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init at ios_base@std@@QAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(locale.obj) : error LNK2005: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo at std@@QAE at PBD@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpmt.lib(locale.obj) : error LNK2005: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo at std@@QAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in msvcrtd.lib(MSVCRTD.dll)
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_str
ing at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(
void)const " (?str@?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBE?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@2 at XZ) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(bool)" (??6?$basic_ostream at DU?$char_traits at D@std@@@
std@@QAEAAV01 at _N@Z) already defined in itkcommon.lib(itkProcessObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(void const *)" (??6?$basic_ostream at DU?$char_traits@
D at std@@@std@@QAEAAV01 at PBX@Z) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream at DU?$char_traits at D@std@@@s
td@@QAEAAV01 at H@Z) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??6std@@YAAAV?$basic_ostream at DU?$c
har_traits at D@std@@@0 at AAV10@PBD at Z) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios at DU?$char_traits at D@std@@@std@@UAE at XZ) already define
d in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??
0?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at H@Z) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios at DU?$char_traits at D@std@@@std@@IAE at XZ) already defined in i
tkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: virtual __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(
void)" (??1?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@UAE at XZ) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (??6?$basic_ostream at DU?$char_traits at D@std@@
@std@@QAEAAV01 at M@Z) already defined in itkcommon.lib(itkProcessObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned int)" (??6?$basic_ostream at DU?$char_traits@
D at std@@@std@@QAEAAV01 at I@Z) already defined in itkcommon.lib(itkLightObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (??6?$basic_ostream at DU?$char_traits
@D at std@@@std@@QAEAAV01 at K@Z) already defined in itkcommon.lib(itkObject.obj); second definition ignored
msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char
,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ABV?$allocator at D@1@@Z) already defined in itkcommon.lib(itkLightObject.obj); second definitio
n ignored
libcpmt.lib(locale0.obj) : warning LNK4006: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet at locale@std@@QBEPBVfacet at 12@I_N at Z) already defined in msvcprtd.lib(MSVCP60D.dll); second def
inition ignored
libcpmt.lib(locale0.obj) : warning LNK4006: "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc at locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(locale0.obj) : warning LNK4006: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init at locale@std@@CAPAV_Locimp at 12@XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(ios.obj) : warning LNK4006: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear at ios_base@std@@QAEXH_N at Z) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(ios.obj) : warning LNK4006: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base at std@@UAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(ios.obj) : warning LNK4006: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init at ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(iostream.obj) : warning LNK4006: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init at ios_base@std@@QAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(iostream.obj) : warning LNK4006: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init at ios_base@std@@QAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(locale.obj) : warning LNK4006: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo at std@@QAE at PBD@Z) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
libcpmt.lib(locale.obj) : warning LNK4006: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo at std@@QAE at XZ) already defined in msvcprtd.lib(MSVCP60D.dll); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xc_z already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xc_a already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xi_z already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(crt0init.obj) : warning LNK4006: ___xi_a already defined in msvcrtd.lib(cinitexe.obj); second definition ignored
LIBCMT.lib(lconv.obj) : warning LNK4006: _localeconv already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
LIBCMT.lib(getenv.obj) : warning LNK4006: _getenv already defined in msvcrtd.lib(MSVCRTD.dll); second definition ignored
Creating library Debug/IPTools.lib and object Debug/IPTools.exp
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/IPTools.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
IPTools.dll - 32 error(s), 164 warning(s)
Can any body help me pls
Its very urgent
Thanks In Advance,
Sindhu
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20051217/2e9c9ff6/attachment.htm
More information about the Insight-developers
mailing list