Hi,
I recently upgraded my compiler/IDE to MSVC 2017 and now started getting a link error as such:

Code:
odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol __vsnwprintf_s referenced in function _StringCchPrintfW
Googling revealed that MS changed the function __vsnwprintf_s() to be inline and I should either link to some library (legacy_stdio_definitions.lib) or include the appropriate header. Both solutions are described here.

I did it the second way, adding to one of the .cpp files:

Code:
#if _MSC_VER >= 1900
#include <stdio.h>
#include <stdarg.h>
#endif
but the error still there.

Should I still link in the library, or just include that piece of code in every single source code file? The code is in DLL which contains just 2 cpp files - one to initialize the DLL and for the exported class definition.

Or there is something else I should do?

Thank you.