Visual Studio 无法将 mod_spnego 链接到 SSPI

发布于 2024-08-27 02:17:44 字数 1159 浏览 3 评论 0原文

我正在尝试编译 mod_spnego (http://sourceforge.net/projects/modgssapache/) Visual C++ 2008 Express Edition 中的 SSPI 支持。我已经设法使编译本身工作正常,但现在我遇到了链接器打印出的一些错误:

正在链接... 创建库 2-win32-debug/mod_spnego.lib 和对象 2-win32-debug/mod_spnego.exp mod_spnego.obj:错误 LNK2019:函数 _handleSpnegoTokenSSPI 中引用的无法解析的外部符号 __imp__DeleteSecurityContext@4 mod_spnego.obj:错误 LNK2019:函数 _handleSpnegoTokenSSPI 中引用的无法解析的外部符号 _QueryContextAttributesA@12 mod_spnego.obj:错误 LNK2019:函数 _handleSpnegoTokenSSPI 中引用的无法解析的外部符号 _FreeContextBuffer@4 mod_spnego.obj:错误 LNK2019:函数 _handleSpnegoTokenSSPI 中引用的无法解析的外部符号 __imp__AcceptSecurityContext@36 mod_spnego.obj:错误 LNK2019:函数 _handleSpnegoTokenSSPI 中引用的无法解析的外部符号 _AcquireCredentialsHandleA@36 2-win32-debug/mod_spnego.so : fatal error LNK1120: 5 unresolved externals

查看源代码,这些方法来自 Microsoft SDK 中的 Sspi.h。我不知道如何在 Windows 上编译东西,所以我有一个简单的问题:哪个 lib 文件包含 SSPI API?我必须链接哪一个?

顺便说一下,目前链接了以下库: kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

谢谢, 梅明格

I am trying to compile mod_spnego (http://sourceforge.net/projects/modgssapache/) with SSPI support in Visual C++ 2008 Express Edition. I have managed to get the compiling itself work fine, but now I am stuck at some errors that the linker prints out:

Linking...
Creating library 2-win32-debug/mod_spnego.lib and object 2-win32-debug/mod_spnego.exp
mod_spnego.obj : error LNK2019: unresolved external symbol __imp__DeleteSecurityContext@4 referenced in function _handleSpnegoTokenSSPI
mod_spnego.obj : error LNK2019: unresolved external symbol _QueryContextAttributesA@12 referenced in function _handleSpnegoTokenSSPI
mod_spnego.obj : error LNK2019: unresolved external symbol _FreeContextBuffer@4 referenced in function _handleSpnegoTokenSSPI
mod_spnego.obj : error LNK2019: unresolved external symbol __imp__AcceptSecurityContext@36 referenced in function _handleSpnegoTokenSSPI
mod_spnego.obj : error LNK2019: unresolved external symbol _AcquireCredentialsHandleA@36 referenced in function _handleSpnegoTokenSSPI
2-win32-debug/mod_spnego.so : fatal error LNK1120: 5 unresolved externals

Looking in the source code, these methods come from Sspi.h in the Microsoft SDK. I have no idea about compiling things on Windows, so I have an easy question: What lib file contains the SSPI API? Which one do I have to link against?

By the way, at the moment, the following libs are linked:
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Thank you,
memminger

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

下雨或天晴 2024-09-03 02:17:44

我想我自己发现了它:Secur32.Lib。

I think I found it out myself: Secur32.Lib.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文