【问题标题】:error LNK2019: unresolved external symbol static library错误 LNK2019:未解析的外部符号静态库
【发布时间】:2020-07-01 13:43:37
【问题描述】:

我正在尝试将我的 C++ VS 2015 可执行文件与 tbarcode 库 8 链接。该库由头文件、lib 文件和 dll 文件组成。

我不断收到错误 LNK 2019,例如 LNK2019: unresolved external symbol __imp_BCAlloc

我正在调试模式下构建,我已将 lib 添加到“Additional Depdencies”设置,将其目录添加到“Additional Library Directories”,并将 dll 目录的路径添加到 PATH 环境变量。

以下是 dumpbin * 的结果,其中显示了混乱的名称):

dumpbin /all TBarCode8.lib | findstr /c:"BCAlloc"
 B8B2 _BCAlloc@4
 B8B2 __imp__BCAlloc@4
    7 _BCAlloc@4
    7 __imp__BCAlloc@4
 Symbol name  : _BCAlloc@4
 Name         : BCAlloc
              _BCAlloc@4

dumpbin /all TBarCode8.dll | findstr /c:"BCAlloc"
      2    0 000247D9 BCAlloc

问题:后缀@4 在损坏的名称中是什么意思?以及如何解决这个错误 LNK 2019?

【问题讨论】:

    标签: dll visual-studio-2015 linker name-mangling tbar


    【解决方案1】:

    我找到了解决方案:我提供的 tbarcode 的 dll 是 32 位的,我尝试在 64 位中构建我的应用程序。用 32 位构建我的应用程序解决了这个问题。

    【讨论】:

    • 最新版本的TBarCode SDK也包含64位库。
    猜你喜欢
    • 1970-01-01
    • 2012-10-31
    • 2012-08-31
    • 1970-01-01
    相关资源
    最近更新 更多