Я использую библиотеку DCMTK 3.6.1 в проекте в Visual Studio 2013 с языком C ++. Мой код отлично работает в режиме отладки, но не в режиме выпуска; Когда я пытаюсь скомпилировать его, у меня есть 275 ошибок, таких как это:
dcmdata.lib (dcdatset.obj): ошибка LNK2038: обнаружено несоответствие
'_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in testapp_new.obj
2>dcmdata.lib(dcdatset.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in testapp_new.obj
2>dcmdata.lib(dcfilefo.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in testapp_new.obj
2>dcmdata.lib(dcfilefo.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in testapp_new.obj
2>dcmdata.lib(dcxfer.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in testapp_new.obj
2>dcmdata.lib(dcxfer.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in testapp_new.obj
2>dcmdata.lib(dctagkey.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in testapp_new.obj
2>dcmdata.lib(dctagkey.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in testapp_new.obj
2>dcmdata.lib(dctag.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in testapp_new.obj
2>dcmdata.lib(dctag.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in testapp_new.obj
2>dcmdata.lib(dcstack.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in testapp_new.obj
Я пробовал много решений, найденных в Интернете, но ничего не работает …
Если я пытаюсь скомпилировать библиотеку DCMTL в режиме выпуска, у меня появляются следующие ошибки:
Error 4 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmdjpls.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(intrface.obj)
Error 5 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmdjpls.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(header.obj)
Error 6 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmdjpls.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(jpegls.obj)
Error 7 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(invarg.obj)
Error 8 error LNK2005: ___crtSetUnhandledExceptionFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 9 error LNK2005: ___crtTerminateProcess already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 10 error LNK2005: ___crtUnhandledException already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 11 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 12 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 13 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 14 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(fflush.obj)
Error 15 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 16 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 17 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 18 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 19 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 20 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(dosmap.obj)
Error 21 error LNK2005: __calloc_crt already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crtheap.obj)
Error 22 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(hooks.obj)
Error 23 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 24 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 25 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 26 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 27 error LNK2005: __get_osfhandle already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(osfinfo.obj)
Error 28 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(errmode.obj)
Error 29 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winxfltr.obj)
Error 30 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(mlock.obj)
Error 31 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(mlock.obj)
Error 32 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(wsetloca.obj)
Error 33 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-bin_2\dcmjpls\apps\MSVCRT.lib(MSVCR120.dll)
Warning 34 warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library C:\dcmtk-bin_2\dcmjpls\apps\LINK
Warning 35 warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library C:\dcmtk-bin_2\dcmjpls\apps\LINK
Error 36 error LNK1169: one or more multiply defined symbols found C:\dcmtk-bin_2\bin\Release\dcmdjpls.exe
Error 37 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcml2pnm.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(intrface.obj)
Error 38 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcml2pnm.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(header.obj)
Error 39 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcml2pnm.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(jpegls.obj)
Error 40 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(invarg.obj)
Error 41 error LNK2005: ___crtSetUnhandledExceptionFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 42 error LNK2005: ___crtTerminateProcess already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 43 error LNK2005: ___crtUnhandledException already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 44 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 45 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 46 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 47 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(fflush.obj)
Error 48 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 49 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 50 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 51 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 52 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 53 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(dosmap.obj)
Error 54 error LNK2005: __calloc_crt already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crtheap.obj)
Error 55 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(hooks.obj)
Error 56 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 57 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 58 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 59 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 60 error LNK2005: __get_osfhandle already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(osfinfo.obj)
Error 61 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(errmode.obj)
Error 62 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winxfltr.obj)
Error 63 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(mlock.obj)
Error 64 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(mlock.obj)
Error 65 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(wsetloca.obj)
Error 66 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-bin_2\dcmjpls\apps\MSVCRT.lib(MSVCR120.dll)
Warning 67 warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library C:\dcmtk-bin_2\dcmjpls\apps\LINK
Warning 68 warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library C:\dcmtk-bin_2\dcmjpls\apps\LINK
Error 69 error LNK1169: one or more multiply defined symbols found C:\dcmtk-bin_2\bin\Release\dcml2pnm.exe
Error 70 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmcjpls.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(intrface.obj)
Error 71 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmcjpls.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(header.obj)
Error 72 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmcjpls.obj C:\dcmtk-bin_2\dcmjpls\apps\charls.lib(jpegls.obj)
Error 73 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(invarg.obj)
Error 74 error LNK2005: ___crtSetUnhandledExceptionFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 75 error LNK2005: ___crtTerminateProcess already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 76 error LNK2005: ___crtUnhandledException already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winapisupp.obj)
Error 77 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 78 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 79 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(_file.obj)
Error 80 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(fflush.obj)
Error 81 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 82 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 83 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 84 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 85 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0dat.obj)
Error 86 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(dosmap.obj)
Error 87 error LNK2005: __calloc_crt already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crtheap.obj)
Error 88 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(hooks.obj)
Error 89 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 90 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 91 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 92 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(crt0init.obj)
Error 93 error LNK2005: __get_osfhandle already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(osfinfo.obj)
Error 94 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(errmode.obj)
Error 95 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(winxfltr.obj)
Error 96 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(mlock.obj)
Error 97 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(mlock.obj)
Error 98 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmjpls\apps\LIBCMT.lib(wsetloca.obj)
Error 99 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-bin_2\dcmjpls\apps\MSVCRT.lib(MSVCR120.dll)
Warning 100 warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library C:\dcmtk-bin_2\dcmjpls\apps\LINK
Warning 101 warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library C:\dcmtk-bin_2\dcmjpls\apps\LINK
Error 102 error LNK1169: one or more multiply defined symbols found C:\dcmtk-bin_2\bin\Release\dcmcjpls.exe
Error 103 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmsend.obj C:\dcmtk-bin_2\dcmnet\apps\charls.lib(intrface.obj)
Error 104 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmsend.obj C:\dcmtk-bin_2\dcmnet\apps\charls.lib(header.obj)
Error 105 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in dcmsend.obj C:\dcmtk-bin_2\dcmnet\apps\charls.lib(jpegls.obj)
Error 106 error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(invarg.obj)
Error 107 error LNK2005: ___crtSetUnhandledExceptionFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(winapisupp.obj)
Error 108 error LNK2005: ___crtTerminateProcess already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(winapisupp.obj)
Error 109 error LNK2005: ___crtUnhandledException already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(winapisupp.obj)
Error 110 error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(_file.obj)
Error 111 error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(_file.obj)
Error 112 error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(_file.obj)
Error 113 error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(fflush.obj)
Error 114 error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0dat.obj)
Error 115 error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0dat.obj)
Error 116 error LNK2005: __exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0dat.obj)
Error 117 error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0dat.obj)
Error 118 error LNK2005: _exit already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0dat.obj)
Error 119 error LNK2005: __errno already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(dosmap.obj)
Error 120 error LNK2005: __calloc_crt already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crtheap.obj)
Error 121 error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(hooks.obj)
Error 122 error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0init.obj)
Error 123 error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0init.obj)
Error 124 error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0init.obj)
Error 125 error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(crt0init.obj)
Error 126 error LNK2005: __get_osfhandle already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(osfinfo.obj)
Error 127 error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(errmode.obj)
Error 128 error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(winxfltr.obj)
Error 129 error LNK2005: __lock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(mlock.obj)
Error 130 error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(mlock.obj)
Error 131 error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR120.dll) C:\dcmtk-bin_2\dcmnet\apps\LIBCMT.lib(wsetloca.obj)
Error 132 error LNK2005: __fileno already defined in LIBCMT.lib(fileno.obj) C:\dcmtk-bin_2\dcmnet\apps\MSVCRT.lib(MSVCR120.dll)
есть ли у вас идеи, как решить проблему?
Следуя совету на официальном форуме DCMTK, я перекомпилировал библиотеку DCMTK с отключенным флагом DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS, и теперь я могу компилировать в режиме отладки / выпуска, так что работает!
Мне нужно установить библиотеку в режиме отладки и после в режиме выпуска
В любом случае я буду исследовать больше на этом материале.
Вы смешиваете библиотеки Debug / Release и Dynamic / Static.
Во-первых, у вас есть
mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease'
Во второй раз, у вас есть:
mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'
Таким образом, вы заменили dynamic + debug на static + release. Вы решили половину проблемы, но испортили другую!
Я предлагаю перекомпилировать библиотеку, но в конфигурации динамического + релиза. Или скомпилируйте ваш проект в конфигурации static + release, но то, что вы хотите, конечно, зависит от вас.
Возможно, библиотеки, которые вы используете, являются компилятором с другой версией VS. Так что вы можете это исправить, только если перекомпилируете библиотеку, которую получили.
Или вы использовали разные настройки для использования CRT (статическое и динамическое связывание).
Заглянуть в ознакомительные файлы! Они не упоминают VS-2013!
Возможно ли использовать флаг компилятора, чтобы игнорировать библиотеки по умолчанию? Это никогда не будет хорошим способом, если вы используете статические библиотеки, созданные с другими версиями VS.