VS2017 unresolved external symbol __vscwprintf

I will upgrade to VS2012 VS2017, then recompile of previous projects, there have been the following error

Error LNK2019 unresolved external symbols __imp__vsnprintf, the symbol is referenced in the function *******

the reason: 

  When vs2017 default compiler will adopt many of the standard library inline processing, so there is no standard library files can be linked, so to add a special link to the standard library functions in the standard library

Solution:

Find a project in vs2017 in the solution -> Properties, the linker - Add legacy_stdio_definitions.lib> Additional Dependencies inside or

At the beginning of the startup file write #pragma comment (lib, "legacy_stdio_definitions.lib")

  

 

Guess you like

Origin www.cnblogs.com/hul201610101100/p/11261639.html