title: Unresolved ___stdio_common_vsprintf_s, what library has this?
body: <p>I'm using VS2015 Community. I have obtained some C code that I'm trying to build. It is all in C and I have made a project as a Console Application.</p>
  
  <p>When  I build I get the below errors. The problem is that __stdio_common_vsprintf_s cannot be found during the link process. So I searched the internet for the symbols but don't get any useful information.</p>
  
  <p>I am using the Runtime Library setting called Multi-threaded (/MT).</p>
  
  <p>I have tried adding #define <strong>STDC_WANT_LIB_EXT1</strong> 1 before all includes but that did not help. I have searched for this problem and have not found any postings that help.</p>
  
  <p>So I searched all of the VS libraries and got lots of hits but I don't know which are definitions and which are references. Then I searched all of the .h files in the VS include folder but no hits.</p>
  
  <p>I suspect there may be another library that I need but don't know what it is. Does anyone have any ideas?</p>
  
  <pre><code>1&gt;LIBCMT.lib(_error_.obj) : error LNK2019: unresolved external symbol ___stdio_common_vsprintf_s referenced in function __vsprintf_s_l
  1&gt;LIBCMT.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol ___vcrt_GetModuleFileNameW referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
  1&gt;LIBCMT.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol ___vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDllFromInstallPath(void)" (?GetPdbDllFromInstallPath@@YAPAUHINSTANCE__@@XZ)
  1&gt;MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
  1&gt;W:\efifs\Debug\testing.exe : fatal error LNK1120: 6 unresolved externals
  </code></pre>
  
  <p>Here are my options:</p>
  
  <pre><code>Compile
  ----------
  /GS 
  /analyze- 
  /W3 
  /Zc:wchar_t 
  /I"W:\efifs\\gnu-efi\inc" 
  /I"W:\efifs\\gnu-efi\inc\ia32" 
  /I"W:\efifs\\grub\include" 
  /I"W:\efifs\\grub-core\lib\minilzo" 
  /I"W:\efifs\testing\" 
  /I"W:\efifs\\gnu-efi\inc\protocol" 
  /I"W:\efifs\\gnu-efi\lib" 
  /I"W:\efifs\\include" 
  /I"W:\efifs\\grub\grub-core\lib\minilzo" 
  /I"W:\efifs\.msvc" 
  /ZI 
  /Gm 
  /Od 
  /Fd"Debug\vc140.pdb" 
  /Zc:inline 
  /fp:precise 
  /D "__STDC_WANT_LIB_EXT1__=1" 
  /D "_UNICODE" 
  /D "UNICODE" 
  /D "GRUB_FILE=__FILE__" 
  /D "HAVE_USE_MS_ABI" 
  /D "GNU_EFI_USE_EXTERNAL_STDARG" 
  /D "DRIVERNAME=testing" 
  /D "WIN32" 
  /D "_DEBUG" 
  /D "_CONSOLE" 
  /errorReport:prompt 
  /WX- 
  /Zc:forScope 
  /RTC1 
  /Gd 
  /Oy- 
  /MT 
  /Fa"Debug\" 
  /EHsc 
  /nologo 
  /Fo"Debug\" 
  /Fp"Debug\testing.pch" 
  
  Link
  -----
  /OUT:"W:\efifs\Debug\testing.exe" 
  /MANIFEST 
  /NXCOMPAT 
  /PDB:"W:\efifs\Debug\testing.pdb" 
  /DYNAMICBASE "efifs.lib" "grub.lib" "gnu-efi.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" 
  /MACHINE:X86 
  /INCREMENTAL 
  /PGD:"W:\efifs\Debug\testing.pgd" 
  /SUBSYSTEM:CONSOLE 
  /MANIFESTUAC:"level='asInvoker' uiAccess='false'" 
  /ManifestFile:"Debug\testing.exe.intermediate.manifest" 
  /ERRORREPORT:PROMPT 
  /NOLOGO 
  /LIBPATH:"W:\efifs\testing\\grub" 
  /LIBPATH:"W:\efifs\testing\\efifs" 
  /LIBPATH:"W:\efifs\testing\\gnu-efi" 
  /TLBID:1 
  </code></pre>