using prebuilt static libraries

asked 2013-10-26 06:48:08 -0500

mogh gravatar image

I want to use prebuilt static libraries in visuall stdio 2008 I have done the following: setting include directory: \opencv\build\include setting c/c++ -> Code Generation -> Runtime Library: /MT setting Additional Library Directories: \opencv\build\x86\vc9\staticlib Additional Dependencies: opencv_calib3d245.lib opencv_contrib245.lib opencv_core245.lib opencv_features2d245.lib opencv_flann245.lib libtiff.lib libpng.lib libjpeg.lib libjasper.lib IlmImf.lib zlib.lib opencv_gpu245.lib opencv_haartraining_engine.lib opencv_highgui245.lib opencv_imgproc245.lib opencv_legacy245.lib opencv_ml245.lib opencv_nonfree245.lib opencv_objdetect245.lib opencv_photo245.lib opencv_stitching245.lib opencv_ts245.lib opencv_video245.lib opencv_videostab245.lib opencv_superres245.lib Vfw32.Lib comctl32.lib

But errors occurs as follows msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in opencv_core245.lib(gpumat.obj) 1>libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl _AtModuleExit(void (__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ@Z) already defined in msvcprt.lib(locale0_implib.obj) 1>libcpmt.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 msvcprt.lib(MSVCP90.dll) 1>libcpmt.lib(locale0.obj) : error LNK2005: __Fac_tidy already defined in msvcprt.lib(locale0_implib.obj) 1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::facet_Register(class std::locale::facet *)" (?facet_Register@facet@locale@std@@CAXPAV123@@Z) already defined in msvcprt.lib(locale0_implib.obj) 1>libcpmt.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 msvcprt.lib(MSVCP90.dll) 1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z) already defined in msvcprt.lib(MSVCP90.dll) 1>libcpmt.lib(xmutex.obj) : error LNK2005: "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ) already defined in msvcprt.lib(MSVCP90.dll) 1>libcpmt.lib(xmutex.obj) : error LNK2005: "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@std@@QAEXXZ) already defined in msvcprt.lib(MSVCP90.dll) 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprt.lib(MSVCP90.dll) 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprt.lib(MSVCP90.dll) 1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR90.dll) 1>LIBCMT.lib(_ctype.obj) : error LNK2005: _isxdigit already defined in MSVCRT.lib(MSVCR90.dll) 1>LIBCMT.lib(lseeki64.obj) : error LNK2005: __lseeki64 already defined in MSVCRT.lib(MSVCR90.dll) 1>LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRT.lib(MSVCR90.dll) 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR90.dll) 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib ... (more)

edit retag flag offensive close merge delete