Skip to content

VS编译标准示例报错无法解析的外部符号 #28

Description

@UnknownObject000

我复制了Readme中的完整客户端例子到VS项目中编译,出现”LNK2001 无法解析的外部符号“错误.(服务端代码不会引起这个错误)
以下为错误内容:

已启动重新生成…
1>------ 已启动全部重新生成: 项目: Application Communication Interface, 配置: Release x64 ------
1>Application Communication Interface.cpp
1>Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
1>- add -D_WIN32_WINNT=0x0601 to the compiler command line; or
1>- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
1>Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
1>webcc.lib(client_session.obj) : error LNK2001: 无法解析的外部符号 __imp_CertCloseStore
1>webcc.lib(client_session.obj) : error LNK2001: 无法解析的外部符号 __imp_CertEnumCertificatesInStore
1>webcc.lib(client_session.obj) : error LNK2001: 无法解析的外部符号 __imp_CertFreeCertificateContext
1>webcc.lib(client_session.obj) : error LNK2001: 无法解析的外部符号 __imp_CertOpenSystemStoreW
1>F:\Application Communication Interface\x64\Release\Application Communication Interface.exe : fatal error LNK1120: 4 个无法解析的外部命令
1>已完成生成项目“Application Communication Interface.vcxproj”的操作 - 失败。
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========

Projects build report:
  Status    | Project [Config|platform]
 -----------|---------------------------------------------------------------------------------------------------
  Failed    | Application Communication Interface\Application Communication Interface.vcxproj [Release|x64]

Build time 00:00:03.553
Build ended at 2022-02-11 14:53:31

图为VS的“错误列表”
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions