unresolved external symbol 不知道是缺少什么类库

shelley_zyclc 2009-02-02 10:16:35
Linking...
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
ChilkatRelSt.lib(ClsCert.obj) : error LNK2001: unresolved external symbol __imp__CertCreateSelfSignCertificate@32
ChilkatRelSt.lib(ClsCert.obj) : error LNK2001: unresolved external symbol __imp__CertStrToNameA@28
ChilkatRelSt.lib(ClsCertStore.obj) : error LNK2001: unresolved external symbol __imp__PFXExportCertStoreEx@20
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptSignMessage@28
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptEncodeObject@20
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptVerifyDetachedMessageSignature@32
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext@4
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext@4
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext@4
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptDecodeMessage@52
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptDecryptMessage@24
CkBaseDbgDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptEncryptMessage@28
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertSetCertificateContextProperty@16
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertSetCertificateContextProperty@16
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext@4
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext@4
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertNameToStrA@20
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateStore@4
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertCloseStore@8
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertSaveStore@24
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDeleteCertificateFromStore@4
CkBaseDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertGetSubjectCertificateFromStore@12
CkBaseDbgDll.lib(Pfx.obj) : error LNK2001: unresolved external symbol __imp__PFXImportCertStore@12
CkBaseDbgDll.lib(Pfx.obj) : error LNK2001: unresolved external symbol __imp__PFXVerifyPassword@12
CkBaseDbgDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgClose@4
CkBaseDbgDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgGetParam@20
CkBaseDbgDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgUpdate@16
CkBaseDbgDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgOpenToDecode@24
CkBaseDbgDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertOpenSystemStoreA@8
CkBaseDbgDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertVerifyCertificateChainPolicy@16
CkBaseDbgDll.lib(ChilkatUrl_wininet.obj) : error LNK2001: unresolved external symbol __imp__InternetCombineUrlA@20

难道是缺少相应的.dll ?
如果我不添加以上lib,则会出现:
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkSFtp::CloseHandle(char const *)" (?CloseHandle@CkSFtp@@QAE_NPBD@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkSFtp::UploadFile(char const *,char const *)" (?UploadFile@CkSFtp@@QAE_NPBD0@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: char const * __thiscall CkSFtp::openFile(char const *,char const *,char const *)" (?openFile@CkSFtp@@QAEPBDPBD00@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkSFtp::InitializeSftp(void)" (?InitializeSftp@CkSFtp@@QAE_NXZ)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkSFtp::AuthenticatePw(char const *,char const *)" (?AuthenticatePw@CkSFtp@@QAE_NPBD0@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkSFtp::Connect(char const *,int)" (?Connect@CkSFtp@@QAE_NPBDH@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CkSFtp::put_IdleTimeoutMs(int)" (?put_IdleTimeoutMs@CkSFtp@@QAEXH@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CkSFtp::put_ConnectTimeoutMs(int)" (?put_ConnectTimeoutMs@CkSFtp@@QAEXH@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CkString::~CkString(void)" (??1CkString@@UAE@XZ)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CkSFtp::~CkSFtp(void)" (??1CkSFtp@@UAE@XZ)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CkString::append(char const *)" (?append@CkString@@QAEXPBD@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: char const * __thiscall CkSFtp::lastErrorText(void)" (?lastErrorText@CkSFtp@@QAEPBDXZ)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkSFtp::UnlockComponent(char const *)" (?UnlockComponent@CkSFtp@@QAE_NPBD@Z)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CkSFtp::CkSFtp(void)" (??0CkSFtp@@QAE@XZ)
SftpUploadDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CkString::CkString(void)" (??0CkString@@QAE@XZ)

请高手指点.
谢谢
...全文
10219 17 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
UnixAgain 2012-04-09
  • 打赏
  • 举报
回复
我现在也出现了这个问题,不过不是这么复杂的东西,是我自己定义的函数disc_positive ,disc_zero,disc_negative ,报错是unresolved symbol _disc_positve,我是新手,我估计没有报下面的错误是因为自上而下连接,检查到这里就停止了,不知道楼主现在有没有想明白了,能否给解释一下?谢谢了
wangyufeng1234 2010-08-31
  • 打赏
  • 举报
回复
学习
impossible is nothing!
muleisheng 2009-12-17
  • 打赏
  • 举报
回复
xiaoxi xiaoxi
cnzdgs 2009-02-02
  • 打赏
  • 举报
回复
debug和release配置都添加了吗?
限时应该是在代码中限制,不会在生成的时候出错。
shelley_zyclc 2009-02-02
  • 打赏
  • 举报
回复
对了,Chilkat提供的lib据他说只能试用30天,
"Each product within the Chilkat class library can be tested for 30 days by calling the UnlockComponent method and passing an arbitrary string to it. For example:
CkZip zip;
zip.UnlockComponent("anything works for 30-day trial");
There are no limitations when testing for 30 days. Upon purchase, you will receive a permanent unlock code that is valid for all future versions of the Chilkat library.
"

难道30天后这些lib就被会锁住而不能被调用???
shelley_zyclc 2009-02-02
  • 打赏
  • 举报
回复
我直接在setting里的link中的lib modules中添加的.
cnzdgs 2009-02-02
  • 打赏
  • 举报
回复
看起来是没有导入crypt32.lib,你是怎么添加的?
jameshooo 2009-02-02
  • 打赏
  • 举报
回复
通常情况下,这是因为有两个项目对系统库的引用方式不一致造成的,例如使用MFC.DLL的方式、使用ATL.DLL的方式等等,检查一下项目设置。
wwwxxb40000 2009-02-02
  • 打赏
  • 举报
回复

学习
lygfqy 2009-02-02
  • 打赏
  • 举报
回复
查看一下dll中导出的名称是不是和你引用的名称一致,如果动态库没有按照c的标准输出,可能会发生名称的错误
shelley_zyclc 2009-02-02
  • 打赏
  • 举报
回复
我按照"http://www.chilkatsoft.com/visual_cpp_lib.html"的提示,添加了"wininet.lib, rpcrt4.lib, crypt32.lib, ws2_32.lib"和相应的"ChilkatDbgDll.lib CkBaseDbgDll.lib",结果为:

ChilkatDbgDll.lib(ClsCert.obj) : error LNK2001: unresolved external symbol __imp__CertCreateSelfSignCertificate@32
ChilkatDbgDll.lib(ClsCertStore.obj) : error LNK2001: unresolved external symbol __imp__PFXExportCertStoreEx@20
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateChain@4
CkBaseDbgDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateChain@4
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateChainEngine@4
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateChain@32
CkBaseDbgDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateChain@32
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertCreateCertificateChainEngine@8
CkBaseDbgDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CryptAcquireCertificatePrivateKey@24
CkBaseDbgDll.lib(KeyContainer.obj) : error LNK2001: unresolved external symbol __imp__CryptAcquireCertificatePrivateKey@24
CkBaseDbgDll.lib(Pfx.obj) : error LNK2001: unresolved external symbol __imp__PFXImportCertStore@12
CkBaseDbgDll.lib(Pfx.obj) : error LNK2001: unresolved external symbol __imp__PFXVerifyPassword@12
CkBaseDbgDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertVerifyCertificateChainPolicy@16

难道是我电脑上的SDK太老,需要更新?
ouyh12345 2009-02-02
  • 打赏
  • 举报
回复
不是缺少dll,而是缺少lib或函数没实现
全文查找CertCreateSelfSignCertificate等,看它在哪个源文件或头文件里,并找出相应的lib
shelley_zyclc 2009-02-02
  • 打赏
  • 举报
回复
谢谢!

http://topic.csdn.net/u/20090201/15/3d7126a6-c5ff-44b7-a2d5-0b7a48eeff54.html?seed=1585300648中的SFTP问题,麻烦满天星帮忙看一看...谢谢!
cnzdgs 2009-02-02
  • 打赏
  • 举报
回复
那就装个新一点SDK试试吧。
把dnsapi.lib复制到项目路径下,或者在link选项中指定路径。
shelley_zyclc 2009-02-02
  • 打赏
  • 举报
回复
都加了.
winmm.lib wininet.lib rpcrt4.lib crypt32.lib ws2_32.lib ChilkatDbgDll.lib CkBaseDbgDll.lib
现在我又增加了一个 dnsapi.lib,不过cannot open file "dnsapi.lib"
但是我可以在电脑中查找到dnsapi.lib的,不知道为什么/...

大哥,麻烦你帮忙看看到底会是什么问题..

16,547

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧