Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2015: LNK2019 error when linking with Muiload.lib

I'm experimenting the next error when including muiload.h and linking with muiload.lib and calling LoadMUILibrary in Visual Studio 2015:

Muiload.lib(muiload.obj) : error LNK2019: unresolved external symbol __vsnwprintf referenced in function "long __stdcall StringVPrintfWorkerW(unsigned short *,unsigned int,unsigned int *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YGJPAGIPAIPBGPAD@Z)

Maybe something wrong in muiload.lib?

like image 505
joseangelmt Avatar asked Aug 25 '15 19:08

joseangelmt


People also ask

How to resolve linking errors in Visual Studio?

The object file or library that contains the definition of the symbol isn't linked. In Visual Studio, make sure the object file or library that contains the symbol definition is linked as part of your project. On the command line, make sure the list of files to link includes the object file or library.

How do I fix unresolved external symbol?

So when we try to assign it a value in the main function, the linker doesn't find the symbol and may result in an “unresolved external symbol” or “undefined reference”. The way to fix this error is to explicitly scope the variable using '::' outside the main before using it.


1 Answers

Solved adding the additional library legacy_stdio_definitions.lib to the linker input as explained in https://social.msdn.microsoft.com/Forums/en-US/5150eeec-4427-440f-ab19-aecb26113d31/updated-to-vs-2015-and-now-get-unresolved-external-errors?forum=vcgeneral

like image 54
joseangelmt Avatar answered Oct 01 '22 18:10

joseangelmt