Hello everyone.  I built DCMTK 3.5.4 successfully but am having problems 
building Plugins Dicom.  I am using Visual Studio 2005 on Windows Vista.  Has 
anybody built Plugins dicom successfully with Visual Studio on Window Vista?

I believe the following might(?) be issues in building Plugins dicom


*** /MD versus /MT ***
When making DCMTK with CMake the CMAKE_CXX_FLAGS have /MD which is the same for 
OSG.  However, when I look at the projects in Visual Studio, the flags are /MT. 
 Is this a problem?  If so, why is CMake not setting it correctly and how can I 
fix it?

*** iostream.h versus iostream ***
OSG uses iostream.  I am not convinced the file ofstream in DCMTK is configured 
to use iostream correctly.  I tried hardcoding the use of iostream without 
getting plugin dicom to build successfully.


*** other library conflicts? ****
I tried the \NoDefaultLib option and tried ignoring some other libraries with 
no success.

*** other problems ***
I might be completely missing something.  Could there be some other problem?  
The output is below.

Thanks!

Jason









Error   72      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_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@q...@xz) 
already defined in dcmimgle.lib(dcmimage.obj)   msvcprtd.lib    
Error   73      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> 
>(char const *)" 
(??0?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@q...@pbd@Z) 
already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib    
Error   74      error LNK2005: "public: class std::basic_ostream<char,struct 
std::char_traits<char> > & __thiscall std::basic_ostream<char,struct 
std::char_traits<char> >::operator<<(class std::basic_ostream<char,struct 
std::char_traits<char> > & (__cdecl*)(class std::basic_ostream<char,struct 
std::char_traits<char> > &))" 
(??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@p6aaav01@AAV01@@z...@z)
 already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib    
Error   75      error LNK2005: "class std::basic_ostream<char,struct 
std::char_traits<char> > & __cdecl std::endl(class 
std::basic_ostream<char,struct std::char_traits<char> > &)" 
(?e...@std@@yaaav?$basic_ostr...@du?$char_traits@d...@std@@@1...@aav21@@Z) 
already defined in dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   76      error LNK2005: "public: class std::basic_ostream<char,struct 
std::char_traits<char> > & __thiscall std::basic_ostream<char,struct 
std::char_traits<char> >::operator<<(double)" 
(??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@n@Z) already 
defined in dcmimgle.lib(diimage.obj)  msvcprtd.lib    
Error   77      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_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@i@Z) already 
defined in dcmdata.lib(dchashdi.obj)    msvcprtd.lib    
Error   78      error LNK2005: "public: class std::basic_ostream<char,struct 
std::char_traits<char> > & __thiscall std::basic_ostream<char,struct 
std::char_traits<char> >::operator<<(class std::ios_base & (__cdecl*)(class 
std::ios_base &))" 
(??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@p6aaavios_base@1...@aav21@@z...@z)
 already defined in dcmdata.lib(dcfilefo.obj)   msvcprtd.lib    
Error   79      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_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@h@Z) already 
defined in dcmimgle.lib(dimoimg.obj)     msvcprtd.lib    
Error   80      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 short)" 
(??6?$basic_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@g@Z) already 
defined in dcmimgle.lib(dimoimg.obj)  msvcprtd.lib    
Error   81      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_ostr...@du?$char_traits@d...@std@@@std@@qaeaa...@k@Z) already 
defined in dcmimgle.lib(dimoimg.obj)   msvcprtd.lib    
Error   82      error LNK2005: "public: char const * __thiscall 
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> 
>::c_str(void)const " 
(?c_...@?$basic_string@du?$char_tra...@d@std@@v?$alloca...@d@2@@std@@QBEPBDXZ) 
already defined in dcmimgle.lib(dcmimage.obj)      msvcprtd.lib    
Error   83      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 std::basic_string<char,struct std::char_traits<char>,class 
std::allocator<char> > const &)" 
(??0?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@q...@abv01@@Z)
 already defined in dcmimgle.lib(dcmimage.obj)   msvcprtd.lib    
Error   84      error LNK2005: "public: int __thiscall 
std::ios_base::setf(int,int)" (?s...@ios_base@std@@qae...@z) already defined in 
dcmimgle.lib(digsdlut.obj)       msvcprtd.lib    
Error   85      error LNK2005: "public: void __thiscall 
std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" 
(?setst...@?$basic_ios@du?$char_tra...@d@std@@@std@@qaex...@z) already defined 
in dcmimgle.lib(dcmimage.obj)   msvcprtd.lib    
Error   86      error LNK2005: "public: int __thiscall 
std::ios_base::width(int)" (?wi...@ios_base@std@@qa...@z) already defined in 
dcmimgle.lib(dcmimage.obj)  msvcprtd.lib    
Error   87      error LNK2005: "public: int __thiscall 
std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const 
*,int)" (?sp...@?$basic_streambuf@du?$char_tra...@d@std@@@std@@qaehp...@z) 
already defined in dcmimgle.lib(dcmimage.obj)     msvcprtd.lib    
Error   88      error LNK2005: "public: static bool __cdecl 
std::char_traits<char>::eq_int_type(int const &,int const &)" 
(?eq_int_t...@?$char_traits@d...@std@@sa_na...@z) already defined in 
dcmimgle.lib(dcmimage.obj)       msvcprtd.lib    
Error   89      error LNK2005: "public: static int __cdecl 
std::char_traits<char>::eof(void)" (?...@?$char_traits@d...@std@@SAHXZ) already 
defined in dcmimgle.lib(dcmimage.obj)        msvcprtd.lib    
Error   90      error LNK2005: "public: int __thiscall 
std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" 
(?sp...@?$basic_streambuf@du?$char_tra...@d@std@@@std@@qa...@z) already defined 
in dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   91      error LNK2005: "public: class std::basic_streambuf<char,struct 
std::char_traits<char> > * __thiscall std::basic_ios<char,struct 
std::char_traits<char> >::rdbuf(void)const " 
(?rd...@?$basic_ios@du?$char_tra...@d@std@@@std@@qbepav?$basic_stream...@du?$char_traits@d...@std@@@2...@xz)
 already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib    
Error   92      error LNK2005: "public: char __thiscall 
std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " 
(?f...@?$basic_ios@du?$char_tra...@d@std@@@std@@QBEDXZ) already defined in 
dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   93      error LNK2005: "public: int __thiscall 
std::ios_base::flags(void)const " (?fl...@ios_base@std@@QBEHXZ) already defined 
in dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   94      error LNK2005: "public: int __thiscall 
std::ios_base::width(void)const " (?wi...@ios_base@std@@QBEHXZ) already defined 
in dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   95      error LNK2005: "public: static unsigned int __cdecl 
std::char_traits<char>::length(char const *)" 
(?len...@?$char_traits@d...@std@@sai...@z) already defined in 
dcmimgle.lib(dcmimage.obj)      msvcprtd.lib    
Error   96      error LNK2005: "public: class std::basic_ostream<char,struct 
std::char_traits<char> > & __thiscall std::basic_ostream<char,struct 
std::char_traits<char> >::flush(void)" 
(?fl...@?$basic_ostream@du?$char_tra...@d@std@@@std@@qaeaa...@xz) already 
defined in dcmimgle.lib(dcmimage.obj)        msvcprtd.lib    
Error   97      error LNK2005: "public: class std::basic_ostream<char,struct 
std::char_traits<char> > * __thiscall std::basic_ios<char,struct 
std::char_traits<char> >::tie(void)const " 
(?...@?$basic_ios@du?$char_tra...@d@std@@@std@@qbepav?$basic_ostr...@du?$char_traits@d...@std@@@2...@xz)
 already defined in dcmimgle.lib(dcmimage.obj) msvcprtd.lib    
Error   98      error LNK2005: "public: bool __thiscall 
std::ios_base::good(void)const " (?g...@ios_base@std@@QBE_NXZ) already defined 
in dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   99      error LNK2005: "public: void __thiscall 
std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" 
(?_o...@?$basic_ostream@du?$char_tra...@d@std@@@std@@QAEXXZ) already defined in 
dcmimgle.lib(dcmimage.obj)        msvcprtd.lib    
Error   100     error LNK2005: "public: void __thiscall 
std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" 
(?_l...@?$basic_streambuf@du?$char_tra...@d@std@@@std@@QAEXXZ) already defined 
in dcmimgle.lib(dcmimage.obj)    msvcprtd.lib    
Error   101     error LNK2005: "public: void __thiscall 
std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" 
(?_unl...@?$basic_streambuf@du?$char_tra...@d@std@@@std@@QAEXXZ) already 
defined in dcmimgle.lib(dcmimage.obj)        msvcprtd.lib    
Error   102     error LNK2005: "private: static class std::locale::_Locimp * 
__cdecl std::locale::_Getgloballocale(void)" 
(?_getgloballoc...@locale@std@@capav_loc...@12@XZ) already defined in 
msvcprtd.lib(MSVCP80D.dll)      libcpmt.lib     
Error   103     error LNK2005: "private: static void __cdecl 
std::locale::facet::facet_Register(class std::locale::facet *)" 
(?facet_regis...@facet@loc...@std@@CAXPAV123@@Z) already defined in 
msvcprtd.lib(MSVCP80D.dll)     libcpmt.lib     
Error   104     error LNK2005: "public: static void __cdecl 
std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" 
(?_locinfo_d...@_locinfo@std@@SAXPAV12@@Z) already defined in 
msvcprtd.lib(MSVCP80D.dll)       libcpmt.lib     
Error   105     error LNK2005: "private: static class std::locale::_Locimp * 
__cdecl std::locale::_Init(void)" (?_i...@locale@std@@capav_loc...@12@XZ) 
already defined in msvcprtd.lib(MSVCP80D.dll)    libcpmt.lib     
Error   106     error LNK2005: "public: static void __cdecl 
std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" 
(?_locinfo_c...@_locinfo@std@@saxpa...@pbd@Z) already defined in 
msvcprtd.lib(MSVCP80D.dll)       libcpmt.lib     
Error   107     error LNK2005: "public: static void __cdecl 
std::ios_base::_Addstd(class std::ios_base *)" 
(?_add...@ios_base@std@@SAXPAV12@@Z) already defined in 
msvcprtd.lib(MSVCP80D.dll)   libcpmt.lib     
Error   108     error LNK2005: "private: static void __cdecl 
std::ios_base::_Ios_base_dtor(class std::ios_base *)" 
(?_ios_base_d...@ios_base@std@@CAXPAV12@@Z) already defined in 
msvcprtd.lib(MSVCP80D.dll)    libcpmt.lib     
Error   109     error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" 
(??0_loc...@std@@q...@h@Z) already defined in msvcprtd.lib(MSVCP80D.dll) 
libcpmt.lib     
Error   110     error LNK2005: "public: __thiscall 
std::_Lockit::~_Lockit(void)" (??1_loc...@std@@q...@xz) already defined in 
msvcprtd.lib(MSVCP80D.dll)        libcpmt.lib     
Error   111     error LNK2005: __invalid_parameter already defined in 
MSVCRTD.lib(MSVCR80D.dll) LIBCMT.lib      
Error   112     error LNK2005: __errno already defined in 
MSVCRTD.lib(MSVCR80D.dll)     LIBCMT.lib      
Error   113     error LNK2005: _localeconv already defined in 
MSVCRTD.lib(MSVCR80D.dll) LIBCMT.lib      
Error   114     error LNK2005: __encode_pointer already defined in 
MSVCRTD.lib(MSVCR80D.dll)    LIBCMT.lib      
Error   115     error LNK2005: __encoded_null already defined in 
MSVCRTD.lib(MSVCR80D.dll)      LIBCMT.lib      
Error   116     error LNK2005: __decode_pointer already defined in 
MSVCRTD.lib(MSVCR80D.dll)    LIBCMT.lib      
Error   117     error LNK2005: __amsg_exit already defined in 
MSVCRTD.lib(MSVCR80D.dll) LIBCMT.lib      
Error   118     error LNK2005: __initterm_e already defined in 
MSVCRTD.lib(MSVCR80D.dll)        LIBCMT.lib      
Error   119     error LNK2005: _fflush already defined in 
MSVCRTD.lib(MSVCR80D.dll)     LIBCMT.lib      
Error   120     error LNK2005: __unlock already defined in 
MSVCRTD.lib(MSVCR80D.dll)    LIBCMT.lib      
Error   121     error LNK2005: __lock already defined in 
MSVCRTD.lib(MSVCR80D.dll)      LIBCMT.lib      
Error   122     error LNK2005: ___CppXcptFilter already defined in 
MSVCRTD.lib(MSVCR80D.dll)    LIBCMT.lib      
Error   123     error LNK2005: _atoi already defined in 
MSVCRTD.lib(MSVCR80D.dll)       LIBCMT.lib      
Error   124     error LNK2005: ___xi_a already defined in 
MSVCRTD.lib(cinitexe.obj)     LIBCMT.lib      
Error   125     error LNK2005: ___xi_z already defined in 
MSVCRTD.lib(cinitexe.obj)     LIBCMT.lib      
Error   126     error LNK2005: ___xc_a already defined in 
MSVCRTD.lib(cinitexe.obj)     LIBCMT.lib      
Error   127     error LNK2005: ___xc_z already defined in 
MSVCRTD.lib(cinitexe.obj)     LIBCMT.lib      
Error   128     error LNK2005: "void __cdecl terminate(void)" 
(?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR80D.dll)  LIBCMT.lib    
  
Error   129     error LNK2005: _getenv already defined in 
MSVCRTD.lib(MSVCR80D.dll)     LIBCMT.lib      
Error   130     error LNK2005: __strtoi64 already defined in 
MSVCRTD.lib(MSVCR80D.dll)  LIBCMT.lib      
Error   131     error LNK2005: __strtoui64 already defined in 
MSVCRTD.lib(MSVCR80D.dll) LIBCMT.lib      
Error   134     error LNK2019: unresolved external symbol _wsaclea...@0 
referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)       
dcmdata.lib     
Error   135     error LNK2019: unresolved external symbol _gethostbyn...@4 
referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)    
dcmdata.lib     
Error   136     error LNK2019: unresolved external symbol _gethostn...@8 
referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)      
dcmdata.lib     
Error   137     error LNK2019: unresolved external symbol _wsastar...@8 
referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)       
dcmdata.lib     
Error   138     error LNK2019: unresolved external symbol _main referenced in 
function ___tmainCRTStartup       LIBCMT.lib      
Error   139     fatal error LNK1120: 5 unresolved externals     
..\..\..\bin\Debug\..\osgPlugins-2.8.2\osgdb_dicomd.dll 
Error   140     fatal error LNK1104: cannot open file 'wldap32.lib'     Plugins 
curl    



Any ideas what I am doing wrong?

Cheers,
Jason

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16976#16976





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to