Page 1 of 1

Unexpected getFormatedErrorMessages error

Posted: Wed Mar 04, 2015 9:22 pm
by huginn18
After fortnight of break project suddenly started returning this weirdo error..

Code: Select all

 Error	4	error C4996: 'Json::Reader::getFormatedErrorMessages': Use getFormattedErrorMessages instead	d:\!w\!l\devlib\include\box2d\b2json\b2djson.cpp	952	1
And again I cant imagine what I should do.

Re: Unexpected getFormatedErrorMessages error

Posted: Thu Mar 05, 2015 12:37 am
by iforce2d
Really? The message explains very clearly what you should do :D

From looking at the jsoncpp source code and docs, it seems they made a typo ('formated') in the first release, and then left it for backwards compatibility. They also made it to show this warning, if the compiler was MSVC 2008 or above:

Code: Select all

#if defined(_MSC_VER)  &&  _MSC_VER >= 1500 // MSVC 2008
/// Indicates that the following function is deprecated.
# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
#endif
Could it be that you are using a different compiler than before?

If it helps, I've changed b2dJson.cpp in github to use the non-typo version.

Re: Unexpected getFormatedErrorMessages error

Posted: Thu Mar 05, 2015 1:53 am
by huginn18
I didn't made any changes in project and I'm using ONLY VC13... so it's still secret to me what happened.
But anywayz thank you for that github thing.
Afterwards you are right this was obvious but sometimes life makes thinking hard. Sorry for your waste of time.