2011-02-07 13 views
14

Ho recentemente compilato la versione SVN di JSONCPP utilizzando i makefile VS71. Ha funzionato, ma ho un sacco di errori del linkerCompilare e utilizzare JSONCPP su Visual Studio10 con Boost

 
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]@@SAX[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 

Inoltre, ho bisogno di usare boost :: multi_array con esso, ma quando ho # definiscono _ITERATOR_DEBUG_LEVEL 0, è in conflitto con _ITERATOR_DEBUG_LEVEL di JSONCPP 2 (bisogno di questo per aumentare :: multi_array ridimensiona per funzionare). Come risolverei questo?

+0

'_ITERATOR_DEBUG_LEVEL 0' non è richiesto dal metodo di ridimensionamento in' boost :: multi_array'. Se hai bisogno di quella definizione, allora stai facendo qualcosa che richiama un comportamento indefinito (e il debug di iteratore ti mostra che c'è un comportamento indefinito). –

+0

Ho bisogno di usarlo perché VC2010 risale al ridimensionamento. Ecco una discussione http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/3c9eac4f-86e4-490b-bbde-dbd70176b0f8. – Yelnats

risposta

25

Tutti gli errori sono indicativi di C runtime settings errato con le build. Assicurarsi che tutti i file oggetto, librerie, ecc sono compilati con la stessa impostazione di runtime, ossia:

  • multithreading (/MT)
  • DLL multithread (/MD)
  • Multithreading Debug (/MTd)
  • multithread Debug DLL (/MDd)

Se questa impostazione non è lo stesso per tutti i progetti, hai violat ed una regola di definizione (perché ogni runtime di C definisce le cose in modo diverso), cosa che risulterebbe nel comportamento che state vedendo.

La mia ipotesi è che la biblioteca JSONCPP è in costruzione assumendo la versione statica della libreria standard (/MT), mentre il codice utilizza il valore di default di Visual Studio, che è la versione collegata dinamicamente (/MD).

È possibile modificare questa impostazione da Visual Studio selezionando le proprietà del progetto per il progetto, passando a C/C++ -> Generazione codice e cambiando la casella a discesa Runtime.

+0

Ho usato/MTd per un'applicazione di test della console di debug con VS2010 e ha funzionato correttamente. – SparkyNZ

Problemi correlati