libgcrypt.lib 中未解析的外部符号

2023-12-31

如果我在 .lib(library) 文件中发现未解析的外部符号,我必须做什么。如果我在 .c 或 .cpp 中发现无法解析的外部符号,我可以修复它。但是当我在 .lib(library) 文件中发现未解析的外部符号时,我该如何解决这个问题?

就我而言,我发现了这样的链接器错误:

错误 1 ​​错误 LNK2019:函数 _fprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-global.o) 中引用了无法解析的外部符号 ___mingw_vfprintf 错误 2 错误 LNK2001:无法解析的外部符号 ___mingw_vfprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-misc.o) 错误 3 错误 LNK2001:无法解析的外部符号 _gpg_strerror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(ecc.o) 错误 4 错误 LNK2019:函数 __gcry_strerror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-global.o) 中引用了无法解析的外部符号 _gpg_strerror 错误 5 错误 LNK2001:无法解析的外部符号 _gpg_strerror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-misc.o) 错误 6 错误 LNK2001:无法解析的外部符号 _gpg_strerror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(md.o) 错误 7 错误 LNK2001:无法解析的外部符号 _gpg_strerror D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-fips.o) 错误 8 错误 LNK2019:函数 __gcry_strsource D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-global.o) 中引用了无法解析的外部符号 _gpg_strsource 错误 9 错误 LNK2019:函数 _do_malloc D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-global.o) 中引用了无法解析的外部符号 _gpg_err_set_errno 错误 10 错误 LNK2001:无法解析的外部符号 _gpg_err_set_errno D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-stdmem.o) 错误 11 错误 LNK2001:无法解析的外部符号 _gpg_err_set_errno D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-secmem.o) 错误 12 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_errno D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-module.o) 错误 13 错误 LNK2019:函数 _gpg_err_make_from_errno D 中引用的无法解析的外部符号 _gpg_err_code_from_errno D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-global.o) 错误 14 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_errno D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-sexp.o) 错误 15 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_errno D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(md.o) 错误 16 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_errno D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(primegen.o) 错误 17 错误 LNK2019:函数 _sprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-sexp.o) 中引用了无法解析的外部符号 ___mingw_vsprintf 错误 18 错误 LNK2001:无法解析的外部符号 ___mingw_vsprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(ac.o) 错误 19 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(primegen.o) 错误 20 错误 LNK2019:函数 _progress D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(dsa.o) 中引用了无法解析的外部符号 _gpg_err_code_from_syserror 错误 21 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(ecc.o) 错误 22 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(random-fips.o) 错误 23 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(mpicoder.o) 错误 24 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(cipher.o) 错误 25 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(pubkey.o) 错误 26 错误 LNK2001:无法解析的外部符号 _gpg_err_code_from_syserror D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(kdf.o) 错误 27 错误 LNK2019:函数 __gcry_pk_get_keygrip D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(pubkey.o) 中引用了无法解析的外部符号 _snprintf 错误 28 错误 LNK2001:无法解析的外部符号 _snprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(md.o) 错误 29 错误 LNK2001:无法解析的外部符号 _snprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(ecc.o) 错误 30 错误 LNK2001:无法解析的外部符号 _snprintf D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(rndw32.o) 错误 31 错误 LNK2019:函数 _init_pool D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(libgcrypt_la-secmem.o) 中引用了无法解析的外部符号 _getpagesize 错误 32 错误 LNK2019:函数 _x931_get_dt D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(random-fips.o) 中引用的无法解析的外部符号 _gettimeofday 错误 33 错误 LNK2001:无法解析的外部符号 _gettimeofday D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\libvlccore\libgcrypt.lib(random-csprng.o) 错误 34 错误 LNK1120:10 个无法解析的外部 D:\VidPlaya_offline\TryingToInincludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\Release\libvlccore.dll 错误 89 错误 LNK2001:无法解析的外部符号“public: virtual struct QMetaObject const * __thiscall UpdateDialog::metaObject(void)const ” (?metaObject@UpdateDialog@@UBEPBUQMetaObject@@XZ) D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\lib_plugin \帮助.obj 错误 90 错误 LNK2001: 无法解析的外部符号“public: virtual void * __thiscall UpdateDialog::qt_metacast(char const *)” (?qt_metacast@UpdateDialog@@UAEPAXPBD@Z) D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\lib_plugin\help .obj 错误 91 错误 LNK2001:无法解析的外部符号“public: virtual int __thiscall UpdateDialog::qt_metacall(enum QMetaObject::Call,int,void * *)”(?qt_metacall@UpdateDialog@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D: \VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\lib_plugin\help.obj 错误 92 错误 LNK1120:3 个无法解析的外部 D:\VidPlaya_offline\TryingToIncludeUpdateFacility\Vidplaya_Plugin_EmbeddedUpdate\vlcwin\Release\plugins\lib_plugin.dll

任何与此相关的建议都会有所帮助。


好吧,基本上你必须找到具有该符号的库 - .lib 或 .a(取决于平台)文件。静态库在链接到可执行文件或共享库之前不会解析其符号,因此您可能有一个未解析所有符号的静态库。您可以使用第 1 点中提到的工具来验证这一点 - 当您转储符号时,未解析的符号将具有U信摆在他们面前。当您将它们链接到应用程序中时,链接器必须解析所有符号,如果缺少某些内容,则会出现未解决的引用错误。你基本上有两个选择:

1)使用符号转储实用程序,例如nm(Windows 上的 Linux 和 MinGW)或dumpbin(Windows 上的 Visual Studio)和 grep 查找符号(如果您有一个充满库的目录,您可以编写一个脚本为每个文件执行此操作),然后当您知道正确的库文件时,将您的代码链接到它(再次取决于在平台上-l<library name>Linux 和 MinGW windows 的切换,添加#pragma comment(lib, "<library name>")或通过 Visual Studio 中的属性页指定库。

2)如果您有所有库的源代码,您可以对函数的定义进行纯文本搜索,然后链接到具有源代码的库。

3) 即使您已经链接到正确的库但 C 和 C++ 代码混合在一起,这些问题也可能会出现。具有 C 接口的库应该将其标头包含在一个extern "C"块,以便当只有具有 C 名称的函数可用时,链接器不会尝试查找具有 C++ 名称的函数。对于 FFmpeg 和其他大型开源项目的初学者来说,这是一个常见问题。

UPDATE

至于原来的问题__mingw_vfprinf— 您将使用 MinGW 编译的代码与 Visual Studio 链接起来有点奇怪,我想说您最好也在您的项目中使用 MinGW,但正如类似的话题 http://mingw.5.n7.nabble.com/undefined-reference-with-mingw-vfprintf-td17020.html这可能是由于缺少libmingwex.a。如果您有 MinGW 工具链,请找到该文件所在的位置,通过 Visual Studio 属性页将该目录添加到链接器搜索目录中,然后添加libmingwex.a作为项目的链接器输入,通过 Visual Studio 属性页或通过上面提到的编译指示。如果您没有 MinGW 工具链,那么您应该下载它,但您需要获得正确的平台 - 但我想既然您在某个地方获得了该库,您就知道它是 32 位还是 64 位。

UPDATE 2

以下是 MinGW 包管理器的示例屏幕截图,显示了哪个包包含该库:

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

libgcrypt.lib 中未解析的外部符号 的相关文章

随机推荐

  • 了解 Schönhage-Strassen 算法(大整数乘法)

    我需要在 Python 中尽可能高效地乘以几个 1000 位长整数 这些数字是从文件中读取的 我正在努力实施申哈格施特拉森 http en wikipedia org wiki Sch C3 B6nhage Strassen algorit
  • 在内核模式下读取/写入 Linux 上的 EFI 变量

    我正在研究 Linux UEFI 我想通过我的驱动程序代码访问 efi 变量 目前我正在寻找像 efi get variable 这样的 linux efi h API 但我不知道如何从我的驱动程序代码中调用这些 API struct ef
  • 如何在opencv-python中填充canny边缘图像

    I have an image for example I apply the Canny edge detector and get this image 我该如何填充这张图片 我希望边缘包围的区域是白色的 我该如何实现这一目标 您可以在
  • PHP/Mysql 日期时间比较?

    我正在尝试做这样的事情 if datetime system date gt 15 minutes false if datetime system date lt 15 minutes true 但我完全迷路了 我不知道如何在 PHP 中
  • 将图像保存到给定位置

    我想截取 iPhone 应用程序视图的屏幕截图并将图像保存到给定位置 我下面的代码将图像保存到照片库 但我想将其保存到其他给定位置 可以这样做吗 请帮我起来 我的代码在这里 UIGraphicsBeginImageContext self
  • Python Paramiko SSH 会话闲置数小时后不活动

    我正在使用 Python Paramikossh exec command从主机向从机发送命令 从 CentOS 到 CentOS 主设备向从设备发送命令并等待 休眠或做一些有意义的事情 从设备完成命令 从站大约需要 10 个小时才能完成命
  • 获取给定 SyntaxTree 中的行号的 SyntaxNode

    我想获取给定位置 lineNumber 的一行的 SyntaxNode 下面的代码应该是不言自明的 但如果有任何问题请告诉我 static void Main string codeSnippet using System class Pr
  • 压缩从浏览器发送的 HTTP Post 数据

    我想用 Javascript 将压缩的 POST 数据发送到我控制的服务器 有没有办法让HTTP层来处理压缩 我正在发送 JSON 如果我将内容类型设置为 GZIP deflate 浏览器会自动压缩它 然后带有 deflate mod 的
  • PHPIniDir 在 Windows 7 下损坏?

    我有一台在 Windows XP 机器上运行的服务器 使用 Apache2 PHP 和 MySQL 我最近升级到 Windows 7 但在运行时遇到了问题 Apache 工作正常 PHP 工作正常 但我似乎无法让它与php ini file
  • 如何在打字时启用历史选择列表

    我正在尝试成为 PowerShell 的一员 并发现了一项我非常喜欢的功能 但不知道如何使其始终如一地工作 PowerShell 可以进入一种模式 在您键入时显示增量更新的历史项目选择列表 然后 您可以通过向上和向下箭头浏览它们来选择要运行
  • Ruby 函数检查一个数字是否能被 5 整除并且是偶数

    def is even n remainder when divided by 2 n 2 if remainder when divided by 2 0 return true else return false end end def
  • 在 Flutter 中使用 iOS 行为时更改 ListView 反弹颜色

    当创建一个ListView 文档中的示例 https flutter io docs cookbook lists basic list 当使用带有 Flutter 的 iOS 模拟器滚动时 我们如何更改出现在列表顶部的反弹颜色 ListV
  • 如何使用 Cython 进行覆盖率分析

    我正在尝试使用一些 Cython 代码运行覆盖率分析pytest cov和工作服 io 我已经构建了启用跟踪的扩展模块 并借助以下链接运行分析 http docs cython org src tutorial profiling tuto
  • 如果远程仓库不可用,如何为 Spring Cloud Config 服务设置本地后备配置?

    我们计划在我们的服务中使用 Spring Cloud Config 我们最担心的是 当容器启动时 它依赖 github 始终可用 以便它可以拉取配置文件 如果 github 宕机 缓解该问题的最佳实践是什么 我正在考虑存储配置的本地文件夹作
  • 在单个 build.gradle 文件中多次调用同一任务

    我有一个自定义 Gradle 插件 它将从模板文件生成 Java 文件 我在不同位置有几个这样的模板文件 我需要 编译 所有这些文件以生成我需要的 Java 文件 获得文件后 我想将它们打包到 jar 中 我认为可以做到这一点的一种方法是从
  • 在 .NET 中打印 - 从毫米到像素的转换

    如何将用户输入从毫米转换为像素 以便将其打印在页面的正确位置 我使用以下代码 private void document PrintPage object sender PrintPageEventArgs e float dpiX e G
  • zip 函数帮助处理元组

    我希望有人能帮助我解决我遇到的问题 我有大量的元组 gt 500 如下所示 2 1 3 6 1 2 5 5 3 0 1 6 10 1 1 4 0 3 3 0 我的代码片段如下 sum1 A B C D creates a tuple of
  • get 返回 hazelcast 3.5 中超类 ArrayList 的值

    我在使用 hazelcast 3 5 时遇到序列化问题 当一个 hazelcast 客户端 Java 输入 class 的值时 public class MyType extends ArrayList
  • 使用 Firestore 和 Typescript 实现动态 Where 条件

    我正在尝试实现存储库模式火库Firebase 和打字稿 Code import firestore from firebase admin import ISearchCriteria from ISearchCriteria export
  • libgcrypt.lib 中未解析的外部符号

    如果我在 lib library 文件中发现未解析的外部符号 我必须做什么 如果我在 c 或 cpp 中发现无法解析的外部符号 我可以修复它 但是当我在 lib library 文件中发现未解析的外部符号时 我该如何解决这个问题 就我而言