2011-02-07 3 views
14

Недавно я скомпилировал SVN-версию JSONCPP с использованием make-файлов VS71. Он работал, но я получаю много ошибок компоновщикаКомпиляция и использование JSONCPP на Visual Studio10 с 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]@@st[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, он конфликтует с _ITERATOR_DEBUG_LEVEL JSONCPP в 2 (это нужно для повышения :: multi_array изменить размер для работы). Как я могу это исправить?

+0

'_ITERATOR_DEBUG_LEVEL 0' не требуется методом изменения размера в' boost :: multi_array'. Если вам нужно это определение, то вы делаете то, что вызывает неопределенное поведение (и отладка итератора показывает вам, что существует неопределенное поведение). –

+0

Мне нужно использовать это, потому что VC2010 поднимается на размер. Вот поток http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/3c9eac4f-86e4-490b-bbde-dbd70176b0f8. – Yelnats

ответ

25

Все ошибки указываются неверно C runtime settings с вашими сборками. Убедитесь, что все ваши объектные файлы, библиотеки и т.д. скомпилированы с той же настройкой времени выполнения, то есть:

  • Многопоточный (/MT)
  • Многопоточный DLL (/MD)
  • Multithreaded Debug (/MTd)
  • Multithreaded Debug DLL (/MDd)

Если этот параметр не является одинаковым для всех проектов, у вас есть violat одно правило определения (поскольку каждая среда выполнения C определяет вещи по-разному), что приведет к поведению, которое вы видите.

Я думаю, что библиотека JSONCPP строятся в предположении статической версии стандартной библиотеки (/MT), в то время как ваш код с помощью визуального умолчанию Studio, которая является динамически связана версией (/MD).

Вы можете изменить этот параметр из Visual Studio, выбрав свойства проекта для своего проекта, перейдя в C/C++ -> Code Generation и изменив раскрывающееся окно Runtime.

+0

Я использовал/MTd для отладочного консольного тестового приложения с VS2010, и он работал нормально. – SparkyNZ