我是靠谱客的博主 包容啤酒,这篇文章主要介绍VS 使用CSP接口 无法解析的外部符号,现在分享给大家,希望可以做个参考。

最近要写一个小工具,在使用CSP接口的时候怎么都无法使用各个接口了。报错信息如下。

复制代码
1
2
3
4
5
1>pcCertManageDlg.obj : error LNK2019: 无法解析的外部符号 __imp__CertOpenStore@20,该符号在函数 "public: void __thiscall CpcCertManageDlg::OnBnClickedButtonInport(void)" (?OnBnClickedButtonInport@CpcCertManageDlg@@QAEXXZ) 中被引用 1>pcCertManageDlg.obj : error LNK2019: 无法解析的外部符号 __imp__CertCreateCertificateContext@12,该符号在函数 "public: void __thiscall CpcCertManageDlg::OnBnClickedButtonInport(void)" (?OnBnClickedButtonInport@CpcCertManageDlg@@QAEXXZ) 中被引用 1>pcCertManageDlg.obj : error LNK2019: 无法解析的外部符号 __imp__CertSetCertificateContextProperty@16,该符号在函数 "public: void __thiscall CpcCertManageDlg::OnBnClickedButtonInport(void)" (?OnBnClickedButtonInport@CpcCertManageDlg@@QAEXXZ) 中被引用 1>pcCertManageDlg.obj : error LNK2019: 无法解析的外部符号 __imp__CertAddCertificateContextToStore@16,该符号在函数 "public: void __thiscall CpcCertManageDlg::OnBnClickedButtonInport(void)" (?OnBnClickedButtonInport@CpcCertManageDlg@@QAEXXZ) 中被引用 1>D:vs2012SpacepcCertManageDebugpcCertManage.exe : fatal error LNK1120: 4 个无法解析的外部命令

解决方案:


只要在 项目属性 - 链接器 - 输入 - 附加依赖项 中加入: crypt32.lib 即可。

这里写图片描述

最后

以上就是包容啤酒最近收集整理的关于VS 使用CSP接口 无法解析的外部符号的全部内容,更多相关VS内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(93)

评论列表共有 0 条评论

立即
投稿
返回
顶部