安装/使用 VS2010 Platform SDK (Microsoft Windows SDK v7.1) 构建。
当我尝试构建示例 LSP(位于 C:\Program Files\Microsoft Platform SDK\Samples\NetDS\WinSock\LSP 中)
!--开始解决--!
我在下面得到了 16 个相同的两个错误。
Error 1 error C1083: Cannot open include file: 'nt.h': No such file or directory c:\program files\microsoft sdks\windows\v7.1\samples\netds\winsock\lsp\nonifslsp\lspdef.h 22 1 LSP
Error 7 error C1083: Cannot open include file: 'lspcommon.h': No such file or directory c:\program files\microsoft sdks\windows\v7.1\samples\netds\winsock\lsp\install\instlsp.h 35 1 LSP
当我将此示例的源代码添加到 VS 时,我使用 File>New ProjectFrom Existing Code。一旦我这样做了,VS 就会开始导入所有 Platform SDK 包含文件。我在别处读到,没有 PSDK 的包含会导致问题,但这里似乎并非如此。
!--结束解决--!
修复上述问题后,我现在又遇到了 3 个错误:
Error 1 error LNK2005: "struct _GUID gProviderGuid" (?gProviderGuid@@3U_GUID@@A) already defined in lspguid.obj C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\netds\winsock\lsp\instlsp.obj LSP
Error 6 error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409 C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\netds\winsock\lsp\CVTRES LSP
Error 7 error LNK1123: failure during conversion to COFF: file invalid or corrupt C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\netds\winsock\lsp\LINK LSP
我没有更改 LSP 示例中的任何内容/文件。
目前我只是在尝试构建它。
对此的任何见解都会有所帮助。
谢谢。