Vista / Win 7 SDK bufferoverflowu.lib链接错误

Vista / Win 7 SDK bufferoverflowu.lib链接错误

问题描述:

我下载了Windows SDK 7.0A来探索一些我正在阅读的东西。我下载了一些使用SDK的示例,但是当我尝试编译它们时,我得到一个错误。我在SDK的Lib目录中找不到它。我也做了一个完整的系统搜索,也没有找到它。

I downloaded the Windows SDK 7.0A to explore some things I was reading about. I downloaded some samples that work with the SDK but when I try to compile them I get an error. I looked in the Lib directory of the SDK and couldn't find it. I also did a full system search and also did not find it.

我已经阅读这是一个特殊的链接在编译或版本检查的结果pragma。我在源代码或所有头文件中找不到对lib的任何引用。

I have read about this being a special link added at compile or the result of a version check in a pragma. I could not find any reference to the lib in the source or all the header files.

我正在运行:

Vista Ultimate

VS 2010 Beta 2

Windows 7和.NET Framework 3.5 Service Pack 1的Microsoft Windows SDK

I'm running:
Vista Ultimate
VS 2010 Beta 2
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1

我的错误:


错误LNK1104:无法打开文件'bufferoverflowu.lib'

error LNK1104: cannot open file 'bufferoverflowu.lib'



I just reinstalled and am still getting the same issue.

您正在尝试创建什么样的示例 - 研究表明,在之前的SDK中, bufferoverflowu.lib (和其他相关的 bufferoverflow * .lib 文件)使用Microsoft之前和之后的编译器添加了编译器生成缓冲区溢出检查的能力(从VS 2003中的/ GS选项开始 - 我想)。

What sample exactly are you trying to build - a little research shows that the bufferoverflowu.lib (and other related bufferoverflow*.lib files) were in previous SDKs to support building with compilers from before and after Microsoft added the ability for the compiler to generate buffer overflow checks (starting with the /GS option in VS 2003 - I think).

在SDK中,所以如果用户构建了一个Windows程序与编译器不支持缓冲区溢出检查,那么已建的SDK库将链接到 bufferoverflow *中的代码。 lib 获取支持。如果用户使用较新的编译器构建,则一切都将链接到具有缓冲区溢出支持的C运行时库。

The libraries were in the SDK so that if the user built a Windows program with compiler that didn't support the buffer overflow checks, the SDK libraries that had been built that way would link to the code in the bufferoverflow*.lib to get the support. If the user was building with a newer compiler, everything would link to the C runtime library that had the buffer overflow support.

但是,Windows SDK v7.0仅支持使用VS 2005 SP1或更高版本构建应用程序,因此缓冲区溢出检查代码始终来自C运行时 - 不再需要 bufferoverflow * .lib 文件。

However, the Windows SDK v7.0 only supports building applications with VS 2005 SP1 or newer, so the buffer overflow checking code always comes from the C runtime - the bufferoverflow*.lib file should no longer be necessary.