尚未解决的___stdio_common_vsprintf_s,这是什么库? [英] Unresolved ___stdio_common_vsprintf_s, what library has this?

查看:2134
本文介绍了尚未解决的___stdio_common_vsprintf_s,这是什么库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2015社区。我已经获得了一些我要构建的C代码。全部用C语言编写,并且我已经将一个项目作为控制台应用程序进行了构建。

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.

在构建时,出现以下错误。问题是在链接过程中找不到__stdio_common_vsprintf_s。因此,我在互联网上搜索了这些符号,但没有得到任何有用的信息。

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.

我正在使用运行时库设置,称为多线程(/ MT)。

I am using the Runtime Library setting called Multi-threaded (/MT).

我尝试在全部包含之前添加#define STDC_WANT_LIB_EXT1 1,但这无济于事。我已经搜索了这个问题,却没有找到任何有用的信息。

I have tried adding #define STDC_WANT_LIB_EXT1 1 before all includes but that did not help. I have searched for this problem and have not found any postings that help.

因此,我搜索了所有VS库并获得了很多成功,但我不知道哪个是定义,是参考。然后我搜索了VS include文件夹中的所有.h文件,但没有找到匹配内容。

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.

我怀疑可能还需要另一个库,但不知道它是什么是。有人有什么想法吗?

I suspect there may be another library that I need but don't know what it is. Does anyone have any ideas?

1>LIBCMT.lib(_error_.obj) : error LNK2019: unresolved external symbol ___stdio_common_vsprintf_s referenced in function __vsprintf_s_l
1>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>LIBCMT.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol ___vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDllFromInstallPath(void)" (?GetPdbDllFromInstallPath@@YAPAUHINSTANCE__@@XZ)
1>MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
1>W:\efifs\Debug\testing.exe : fatal error LNK1120: 6 unresolved externals

以下是我的选择:

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 


推荐答案

如果您看一下vsprintf的声明方式,则可以跟踪它corecrt_stdio ...在其中对其内联的地方。

If you look how vsprintf is declared you can trace it corecrt_stdio ... where it says to inline it.

我有些老了DLL链接到旧的msvcrt并尝试从中导入vsprintf,但似乎VS2015具有新的标头并尝试内联它。

I had some old DLL which were linking against old msvcrt and trying to import vsprintf from it but seems like VS2015 have new headers and trying to inline it.

设置_NO_CRT_STDIO_INLINE有助于解决它,请尽情享受。

Setting _NO_CRT_STDIO_INLINE helped to resolve it, Enjoy.

编辑:另请 https://msdn.microsoft.com/zh-CN/library/bb531344.aspx

这篇关于尚未解决的___stdio_common_vsprintf_s,这是什么库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆