I'm trying to build an application developed in VS 2010 with VS2017. When I'm building the application I'm getting the following error:
error: : Macro definition of snprintf conflicts with Standard Library function declaration
I tried to solve this issue like as here. But It doesn't work in my case.
I'm using windows 10 with VS2017 community 15.8.2.
As the error in your question shows, you have a macro definition for snprintf
that is no longer compatible with your current version.
So you need to look for the following:
#define snprintf _snprintf
You can either remove it or if you need to also compile your code with Visual Studio 2010 you can add the following condition:
#if _MSC_VER < 1700
#define snprintf _snprintf
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With