2

I have a solution that was originally a VS2008 one, I have migrated it to VS2012 and that didn't create a problem. My solution uses DCMTK static libraries so I compiled them also using VS 2012. In total there are 68 projects in the solution of which only one requires the DCMTK libraries.

Now, while compiling that single project(Which in C++) I'm getting the following errors:

Error   482 error LNK1120: 4 unresolved externals      
Error   478 error LNK2019: unresolved external symbol "int __cdecl ConvertRawToJPEG(unsigned char *,unsigned char *,int,int,int &,int)" (?ConvertRawToJPEG@@YAHPAE0HHAAHH@Z) referenced in function "public: virtual long __stdcall DxsDicomFileCreator::CreateThumbnailImage16(unsigned short *)" (?CreateThumbnailImage16@DxsDicomFileCreator@@UAGJPAG@Z)
Error   479 error LNK2019: unresolved external symbol "int __cdecl GetJPEGImage(unsigned char *,int,unsigned char *,int)" (?GetJPEGImage@@YAHPAEH0H@Z) referenced in function __catch$?ExtractImageBuffer8@DxsDicomImage@@UAGJPA_WPAPAE@Z$0 
Error   480 error LNK2019: unresolved external symbol "int __cdecl GetJPEGImage16(unsigned char *,int,unsigned short *,int)" (?GetJPEGImage16@@YAHPAEHPAGH@Z) referenced in function __catch$?ExtractImageBuffer@DxsDicomImage@@UAGJPA_WPAPAG@Z$0
Error   481 error LNK2019: unresolved external symbol "public: virtual class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > __thiscall CFileFind::GetFileTitleA(void)const " (?GetFileTitleA@CFileFind@@UBE?AV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@XZ) referenced in function "public: virtual long __stdcall DxsDicomPrintSCU::PrintSCU(void)" (?PrintSCU@DxsDicomPrintSCU@@UAGJXZ)
Error   377 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'
Error   348 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' DxsBaseDicomSCU.obj 
Error   361 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj
Error   315 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  
Error   80  error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  
Error   233 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  
Error   245 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  
Error   181 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  
Error   211 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  
Error   174 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in DxsBaseDicomSCU.obj  

Now, these errors come when I use the /MT runtime DCMTK libraries I have tried building the DCMTK libs using the /MD runtime also and the following errors come up in that case:

Error   3172    error LNK1120: 89 unresolved externals
Error   2157    error LNK2001: unresolved external symbol "__declspec(dllimport) __int64 const std::_BADOFF" (__imp_?_BADOFF@std@@3_JB) 
Error   2273    error LNK2001: unresolved external symbol "__declspec(dllimport) bool __cdecl std::uncaught_exception(void)" (__imp_?uncaught_exception@std@@YA_NXZ)    
Error   2714    error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z) 
Error   2240    error LNK2001: unresolved external symbol "__declspec(dllimport) const std::basic_ios<char,struct std::char_traits<char> >::`vftable'" (__imp_??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@) 
Error   2205    error LNK2001: unresolved external symbol "__declspec(dllimport) const std::ios_base::`vftable'" (__imp_??_7ios_base@std@@6B@)  
Error   2210    error LNK2001: unresolved external symbol "__declspec(dllimport) const std::ios_base::`vftable'" (__imp_??  _7ios_base@std@@6B@)    
Error   1743    error LNK2001: unresolved external symbol "__declspec(dllimport) private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (__imp_?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z)   
Error   3164    error LNK2001: unresolved external symbol "__declspec(dllimport) protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (__imp_??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ)    
Error   2454    error LNK2001: unresolved external symbol "__declspec(dllimport) protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (__imp_?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ)  D:\CCRC_VS\Allura_FCFD_Win7_Dev_Laxmi\Drishti\Drishti\Code\Drishti.DataTier\Drishti.DicomLibrary\oflog.lib(threads.obj) DXSDICOMLIBRARY
Error   3037    error LNK2001: unresolved external symbol "__declspec(dllimport) protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (__imp_?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z) 
Error   1658    error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Lockit::~_Lockit(void)" (__imp_??1_Lockit@std@@QAE@XZ)    
Error   2788    error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_iostream<char,struct std::char_traits<char> >::basic_iostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *)" (__imp_??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z)    
Error   1680    error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::locale::id::operator unsigned int(void)" (__imp_??Bid@locale@std@@QAEIXZ)  
Error   1691    error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall std::codecvt_base::always_noconv(void)const " (__imp_?always_noconv@codecvt_base@std@@QBE_NXZ) 
Error   2620    error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (__imp_?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ)   
Error   2840    error LNK2001: unresolved external symbol "public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAEXXZ)   
Error   1666    error LNK2019: unresolved external symbol "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z) referenced in function "class std::codecvt<char,char,int> const & __cdecl std::use_facet<class std::codecvt<char,char,int> >(class std::locale const &)" (??$use_facet@V?$codecvt@DDH@std@@@std@@YAABV?$codecvt@DDH@0@ABVlocale@0@@Z)

So, I am not really sure which runtime option to use while building the static dcmtk libraries and also how to move ahead. Any help would be really appreciated, as I am a total newbie in all this

EDIT:

This is the output that I get while building with the /MD Runtime

1>dcmimgle.lib(dimoimg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned short)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z)
1>dcmimgle.lib(digsdlut.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned short)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z)
1>dcmpstat.lib(dviface.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned short)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z) referenced in function "private: class OFCondition __thiscall DVInterface::createQueryRetrieveServerConfigFile(char const *)" (?createQueryRetrieveServerConfigFile@DVInterface@@AAE?AVOFCondition@@PBD@Z)
1>dcmdata.lib(dcobject.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned short)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z)
1>dcmdata.lib(dcelem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned short)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z)
1>dcmdata.lib(dcsequen.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned short)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z)
1>ofstd.lib(ofconapp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>oflog.lib(fileap.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>oflog.lib(oflog.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>oflog.lib(appender.obj) : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>oflog.lib(syncprims.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmnet.lib(dul.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmnet.lib(dimdump.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmqrdb.lib(dcmqrdbi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>oflog.lib(patlay.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmdata.lib(dcdicent.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmimgle.lib(digsdfn.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmimgle.lib(diciefn.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmnet.lib(assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmpstat.lib(dviface.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) referenced in function "private: class OFCondition __thiscall DVInterface::createQueryRetrieveServerConfigFile(char const *)" (?createQueryRetrieveServerConfigFile@DVInterface@@AAE?AVOFCondition@@PBD@Z)
1>dcmdata.lib(dcpxitem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmdata.lib(dcvrobow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmdata.lib(dchashdi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
1>dcmpstat.lib(dviface.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z) referenced in function "private: class OFCondition __thiscall DVInterface::createQueryRetrieveServerConfigFile(char const *)" (?createQueryRetrieveServerConfigFile@DVInterface@@AAE?AVOFCondition@@PBD@Z)
1>dcmnet.lib(assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z)
1>dcmqrdb.lib(dcmqrdbi.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z)
1>dcmsr.lib(dsrimgfr.obj) : error LNK2001: unresolved external symbol  "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z)
1>dcmimage.lib(dicoimg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmsr.lib(dsrtcosp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>oflog.lib(threads.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmimgle.lib(dimoimg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmimgle.lib(dimoimg3.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmimgle.lib(dimoimg4.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmimgle.lib(dimoimg5.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcsequen.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcdirrec.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmimgle.lib(digsdfn.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmimgle.lib(diciefn.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcpixseq.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcpxitem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcobject.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcelem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmpstat.lib(dviface.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z) referenced in function "private: class OFCondition __thiscall DVInterface::createQueryRetrieveServerConfigFile(char const *)" (?createQueryRetrieveServerConfigFile@DVInterface@@AAE?AVOFCondition@@PBD@Z)
1>dcmpstat.lib(dvsighdl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcitem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmdata.lib(dcddirif.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z)
1>dcmsr.lib(dsrdoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) const std::basic_ostream<char,struct std::char_traits<char> >::`vftable'" (__imp_??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@)
1>dcmpstat.lib(dvsighdl.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) const std::basic_ostream<char,struct std::char_traits<char> >::`vftable'" (__imp_??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@) referenced in function "private: void __thiscall DVSignatureHandler::updateSignatureValidationOverview(void)" (?updateSignatureValidationOverview@DVSignatureHandler@@AAEXXZ)
1>dcmnet.lib(assoc.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) const std::basic_ostream<char,struct std::char_traits<char> >::`vftable'" (__imp_??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@)
1>dcmnet.lib(dul.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) const std::basic_ostream<char,struct std::char_traits<char> >::`vftable'" (__imp_??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@)
1>dcmnet.lib(dimdump.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) const std::basic_ostream<char,struct std::char_traits<char> >::`vftable'" (__imp_??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@)
 1>dcmnet.lib(dimdump.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z) referenced in function "void __cdecl DIMSE_printNStatusString(class std::basic_ostream<char,struct std::char_traits<char> > &,int)" (?DIMSE_printNStatusString@@YAXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@H@Z)
 1>dcmnet.lib(dulparse.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)
 1>dcmdata.lib(dcsequen.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)
1>dcmdata.lib(dcvrat.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)
1>dcmdata.lib(dcvrobow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)
 1>dcmnet.lib(dul.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)
1>dcmdata.lib(dcitem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)
 1>dcmdata.lib(dcpxitem.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) 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 &))" (__imp_??6?$basic_ostream@DU? $char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z)


1>..\..\Bin\DXSDICOMLIBRARY.dll : fatal error LNK1120: 89 unresolved externals
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
  • Could it be that different 32 / 64 bit settings were used to build? – πάντα ῥεῖ Feb 24 '15 at 11:52
  • Do the second set of errors (unresolved externals) come up when building the DCMTK library or your project? – yzt Feb 24 '15 at 12:11
  • The second set of errors come while building my project, the dcmtk solution builds flawlessly in both the runtime configurations. – Ankit Singh Feb 24 '15 at 12:19
  • @AnkitSingh: It seems like you are not linking against the standard C++ library, which is very strange and unlikely. These are shots in the dark, but could you check whether you are "ignoring" any default libraries in your link settings? Or maybe you are compiling as C instead of C++. Also, you can set the build log settings to be verbose (in VS options; not your project's) and check/post those. – yzt Feb 24 '15 at 16:22
  • @yzt I think there has been some problem in posting the output, the files that have these errors are the dcmtk libraries. I will post the output tomorrow once I reach the office and will also check whether some default library is being missed or what. Can you tell me whether I should build dcmtk libs using the Mt or MD option? – Ankit Singh Feb 24 '15 at 17:15
  • @AnkitSingh: Using DLL runtime is the more compatible option. But whichever you choose, you should make sure it's the same across all files you are linking together (libraries, object files, projects, etc.) – yzt Feb 25 '15 at 10:33

1 Answers1

0

I got through the above problem and finally after struggling for days found a solution. Now, I am building the solution in /MD and have made sure that the libraries being linked to are also compiled using the same settings.

Regarding the solution msvcprt.lib was added in the ignore specific default libraries in the Linker options when we were building the project in x86 but now when building in x64 this seemed to be the major issue. I removed msvcprt.lib from ignore specific default libraries and then the build was fine and successful.

One thing that I still don't know is why was it working fine in x86 but not in x64.