Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

trouble with opencv 3 and visual studio 2010

Hi

i have installed opencv 3 on D:\ drive. based on this guide and its next page i have a couple of problems: link text. could anybody help me? - thanks

  1. i have had to set (system) environment variable : "OPENCV_DIR" as "D:\OpenCV\Build\x86\vc10" , but there are vc11 and vc12 folders instead. (???)

  2. neither of opencv_...300d.lib files for debug, nor opencv_...300.lib files for release exist in $(OPENCV_DIR)\lib subfolder but they exist in $(OPENCV_DIR)\staticlib subfolder. (???)

  3. finally compiling the sample program led to a lot of errors: (???)

1>------ Build started: Project: test1, Configuration: Debug Win32 ------ 1>Build started 10/23/2015 9:26:06 PM. 1>InitializeBuildStatus: 1> Touching "Debug\test1.unsuccessfulbuild". 1>ClCompile: 1> All outputs are up-to-date. 1>ManifestResourceCompile: 1> All outputs are up-to-date. 1>opencv_core300d.lib(stl.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(alloc.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(matrix.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(opencv_core_pch.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(system.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(umatrix.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(copy.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(convert.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(matop.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(stat.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(kmeans.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(array.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(datastructs.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(cuda_gpu_mat.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(cuda_host_mem.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(cuda_stream.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(opengl.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(ocl.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(opencl_kernels_core.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(matmul.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(arithm.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(lapack.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(parallel.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(rand.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(persistence.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(tables.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(opencl_clamdblas.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(opencl_clamdfft.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(opencl_core.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_core300d.lib(pca.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_highgui300d.lib(window.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_highgui300d.lib(opencv_highgui_pch.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_highgui300d.lib(window_w32.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(loadsave.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(utils.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(opencv_imgcodecs_pch.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_bmp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_sunras.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_jpeg.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_pxm.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_tiff.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_png.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_jpeg2000.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_exr.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_webp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_hdr.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(bitstrm.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(grfmt_base.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgcodecs300d.lib(rgbe.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgproc300d.lib(color.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgproc300d.lib(opencv_imgproc_pch.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgproc300d.lib(demosaicing.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgproc300d.lib(tables.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>opencv_imgproc300d.lib(opencl_kernels_imgproc.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>msvcprtd.lib(MSVCP100D.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<<(class std::basic_ostream<char,struct std::char_traits<char=""> > & (__cdecl*)(class std::basic_ostream<char,struct std::char_traits<char=""> > &))" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char=""> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" (?width@ios_base@std@@QAE_J_J@Z) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char=""> >::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char=""> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : 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 " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char=""> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBE_JXZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : 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)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : 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 " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in opencv_core300d.lib(ocl.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char=""> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in opencv_core300d.lib(ocl.obj) 1>libcpmtd.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(xdebug.obj) : error LNK2005: "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(xdebug.obj) : error LNK2005: "void * __cdecl operator new" (??_U@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(xdebug.obj) : error LNK2005: "struct std::_DebugHeapTag_t const & __cdecl std::_DebugHeapTag_func(void)" (?_DebugHeapTag_func@std@@YAABU_DebugHeapTag_t@1@XZ) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP100D.dll) 1>libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP100D.dll) 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf_s already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj) 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj) 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj) 1>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj) 1>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj) 1>LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR100D.dll) 1>LIBCMTD.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRTD.lib(MSVCR100D.dll) 1>opencv_core300d.lib(mathfuncs.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in main.obj 1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library 1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library 1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.40 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========