最近要写一个小工具,在使用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内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复