2011-02-07 20 views
14

साथ दृश्य Studio10 पर JSONCPP का उपयोग करते हुए मैं हाल ही में VS71 makefiles का उपयोग कर JSONCPP की SVN संस्करण तैयार की है। यह काम किया, लेकिन मैंसंकलन और बूस्ट

 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,__int64)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@QAEXXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.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 " ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Init(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@IAEXXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected][email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@QBEDXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@IAEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *,char *)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbump(int)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Gninc(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@IAEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::epptr(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gbump(int)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::egptr(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbase(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::eback(void)const " ([email protected][email protected][email protected]@[email protected]@@[email protected]@IBEPADXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.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)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.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<<(int)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]@Z) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __thiscall std::basic_ostream<char,struct std::char_traits<char> >::~basic_ostream<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.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 " ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::imbue(class std::locale const &)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]@@Z) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sync(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@MAEHXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setbuf(char *,__int64)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected][email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::xsputn(char const *,__int64)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::xsgetn(char *,__int64)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::uflow(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@MAEHXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: virtual __int64 __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::showmanyc(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@MAE_JXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@UAEXXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@UAEXXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" ([email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" ([email protected][email protected]@@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(void)const " ([email protected][email protected]@@QBE_JXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " ([email protected][email protected]@@QBEHXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " ([email protected][email protected]@@QBE_NXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: int __thiscall std::ios_base::rdstate(void)const " ([email protected][email protected]@@QBEHXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)" ([email protected]@[email protected]@@[email protected]) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::locale::facet::_Incref(void)" ([email protected]@[email protected]@@QAEXXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __thiscall std::locale::id::operator unsigned int(void)" ([email protected]@[email protected]@QAEIXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" ([email protected][email protected]@@QAEXXZ) already defined in JSONCPP.lib(json_reader.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" ([email protected]@@[email protected]) already defined in JSONCPP.lib(json_reader.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __thiscall std::_Container_base0::_Orphan_all(void)" ([email protected][email protected]@@QAEXXZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: bool __thiscall std::basic_istream<char,struct std::char_traits<char> >::_Ipfx(bool)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@[email protected]) already defined in JSONCPP.lib(json_reader.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::snextc(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@QAEHXZ) already defined in JSONCPP.lib(json_reader.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)" ([email protected][email protected][email protected]@[email protected]@@[email protected]@QAEHXZ) already defined in JSONCPP.lib(json_reader.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: class std::locale __thiscall std::ios_base::getloc(void)const " ([email protected][email protected]@@[email protected]@XZ) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *,class std::locale const *)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@@Z) already defined in JSONCPP.lib(json_writer.obj) 
1>msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: bool __thiscall std::ctype<char>::is(short,char)const " ([email protected][email protected]@[email protected]@[email protected]) already defined in JSONCPP.lib(json_reader.obj) 
1>libcpmt.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" ([email protected][email protected]@@[email protected]@Z) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" ([email protected][email protected]@@[email protected]@Z) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static void __cdecl std::locale::facet::_Facet_Register(class std::locale::facet *)" ([email protected]@[email protected]@@[email protected]@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)" ([email protected]@[email protected]@[email protected]@XZ) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" ([email protected][email protected]@@[email protected]@Z) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" ([email protected][email protected]@@[email protected]@Z) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" ([email protected][email protected]@@[email protected]@XZ) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" ([email protected]@@[email protected]@Z) already defined in msvcprt.lib(MSVCP100.dll) 
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" ([email protected]@@[email protected]) already defined in msvcprt.lib(MSVCP100.dll) 
1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" ([email protected]@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(typinfo.obj) : error LNK2005: "public: void __thiscall type_info::_type_info_dtor_internal_method(void)" ([email protected][email protected]@QAEXXZ) already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(typinfo.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in MSVCRT.lib(ti_inst.obj) 
1>LIBCMT.lib(typinfo.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" ([email protected]@[email protected]@@Z) already defined in MSVCRT.lib(ti_inst.obj) 
1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll) 
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) 
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) 
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) 
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) 
1>LIBCMT.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj) 
1>LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll) 
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library 

इसके अलावा, मैं इसके साथ बढ़ावा :: multi_array उपयोग करने की आवश्यकता लिंकर त्रुटियों की एक बहुत कुछ मिलता है, लेकिन जब मैं # _ITERATOR_DEBUG_LEVEL 0 परिभाषित करते हैं, यह JSONCPP के _ITERATOR_DEBUG_LEVEL 2 का विरोध (बढ़ावा के लिए इस की जरूरत है :: mult_array काम करने के लिए आकार बदलें)। मैं इसे कैसे ठीक करूं?

+0

'_ITERATOR_DEBUG_LEVEL 0'' बढ़ावा :: multi_array' में आकार बदलने के विधि द्वारा की आवश्यकता नहीं है। यदि आपको परिभाषित करने की आवश्यकता है, तो आप ऐसा कुछ कर रहे हैं जो अपरिभाषित व्यवहार का आह्वान करता है (और इटरेटर डिबगिंग आपको दिखा रहा है कि अपरिभाषित व्यवहार है)। –

+0

मुझे इसका उपयोग करने की आवश्यकता है क्योंकि वीसी -2010 आकार बदलने पर टूट गया है। यहाँ एक धागा http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/3c9eac4f-86e4-490b-bbde-dbd70176b0f8 है। – Yelnats

उत्तर

25

त्रुटियों के सभी अपने बनाता है के साथ गलत C runtime settings का संकेत कर रहे हैं। सुनिश्चित करें कि आपके वस्तु फ़ाइलों, पुस्तकालयों, आदि के सभी एक ही क्रम सेटिंग के साथ संकलित कर रहे हैं, वह है:

  • थ्रेड (/MT)
  • थ्रेड DLL (/MD)
  • थ्रेड डीबग (/MTd)
  • थ्रेड डीबग DLL (/MDd)

इस सेटिंग को सभी परियोजनाओं के लिए ही नहीं है, तो आप violat है एक परिभाषा नियम संपादित करें (क्योंकि प्रत्येक सी रनटाइम चीजों को अलग-अलग परिभाषित करता है) जिसके परिणामस्वरूप आप जो व्यवहार देख रहे हैं।

मेरा अनुमान है कि JSONCPP पुस्तकालय, मानक पुस्तकालय (/MT) के स्थिर संस्करण मानते हुए, जबकि आपके कोड दृश्य स्टूडियो डिफ़ॉल्ट, गतिशील रूप से जुड़ा हुआ संस्करण (/MD) जो उपयोग कर रहा है का निर्माण किया जा रहा है।

आप अपनी परियोजना के लिए परियोजना के गुण का चयन करके दृश्य स्टूडियो के भीतर से इस सेटिंग को बदल सकते हैं, C/C++ के लिए जा रहा -> कोड जनरेशन, और रनटाइम ड्रॉपडाउन बॉक्स बदलते।

+0

मैंने वीएस -2010 के साथ डीबग कंसोल टेस्ट ऐप के लिए/एमटीडी का इस्तेमाल किया और यह ठीक काम किया। – SparkyNZ

संबंधित मुद्दे