- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如果我在.lib(library)文件中找到了未解析的外部符号,该怎么办。如果我在.c或.cpp中发现了无法解析的外部符号,则可以对其进行修复。但是,当我在.lib(library)文件中找到未解析的外部符号时,该如何解决呢?
就我而言,我发现了这样的链接器错误:
错误1错误LNK2019:函数_fprintf中引用的未解析的外部符号___mingw_vfprintf D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-global.o)
错误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中引用的未解析的外部符号_gpg_strerror D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-global.o)
错误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 \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-fips.o)
错误8错误LNK2019:函数__gcry_strsource D中引用了未解析的外部符号_gpg_strsource D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-global.o)
错误9错误LNK2019:函数_do_malloc D中引用的未解析外部符号_gpg_err_set_errno D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-global.o)
错误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(lib。
错误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 \ TryingToIncludeUpdateFacility \ 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中引用的未解析的外部符号___mingw_vsprintf D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-sexp.o)
错误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中引用的未解决的外部符号_gpg_err_code_from_syserror D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(dsa.o)
错误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 \ TryingToIncludeUpdateFacility \ 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 \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(pubkey.o)
错误26错误LNK2001:无法解析的外部符号_gpg_err_code_from_syserror D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(kdf.o)
错误27错误LNK2019:函数__gcry_pk_get_keygrip D中引用的未解析的外部符号_snprintf D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(pubkey.o)
错误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中引用的未解析的外部符号_getpagesize:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(libgcrypt_la-secmem.o)
错误32错误LNK2019:函数_x931_get_dt D中引用的未解析的外部符号_gettimeofday D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(random-fips.o)
错误33错误LNK2001:无法解析的外部符号_gettimeofday D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ libvlccore \ libgcrypt.lib(random-csprng.o)
错误34错误LNK1120:10个未解决的外部D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_EmbeddedUpdate \ vlcwin \ Release \ libvlccore.dll
错误89错误LNK2001:无法解析的外部符号“ public:虚拟结构QMetaObject const * __thiscall UpdateDialog :: metaObject(void)const”(?metaObject @ UpdateDialog @@ UBEPBUQMetaObject @@ XZ)D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_inmbed \ help.obj
错误90错误LNK2001:无法解析的外部符号“公共:虚拟void * __thiscall UpdateDialog :: qt_metacast(char const *)”(?qt_metacast @ UpdateDialog @@ UAEPAXPBD @ Z)D:\ VidPlaya_offline \ TryingToIncludeUpdateFacility \ Vidplaya_Plugin_Embeddedlib \ in .obj
错误91错误LNK2001:无法解析的外部符号“公共:虚拟int __thiscall UpdateDialog :: qt_metacall(枚举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作为符号(如果您的目录充满了库,则可以创建一个脚本来执行此操作)每个文件),然后在您知道正确的库文件后,将代码链接至该文件(再次取决于Linux和MinGW窗口的平台-l<library name>
开关,添加#pragma comment(lib, "<library name>")
或通过Visual Studio中的属性页指定该库。
2)如果您具有所有库的源代码,则可以执行纯文本搜索以定义函数,然后链接具有源代码库的库。
3)即使您已经与适当的库链接,但C和C ++代码混合在一起,也可能出现这些问题。具有C接口的库的标头应包含在extern "C"
块中,以便当只有具有C名称的函数可用时,链接程序不会尝试查找具有C ++名称的函数。对于FFmpeg和其他大型开源项目的初学者来说,这是一个常见问题。
更新
至于__mingw_vfprinf
的原始问题-您将使用MinGW与Visual Studio编译的代码链接起来有点奇怪,我想说您最好也将MinGW用于您的项目,但建议在similar topic中,这可能是由于缺少libmingwex.a
引起的。如果您具有MinGW工具链,请找到文件所在的位置,然后通过Visual Studio属性页将该目录添加到链接程序搜索目录中,并通过Visual Studio属性页或通过提到的编译指示将libmingwex.a
作为链接程序输入添加到项目中以上。如果您没有MinGW工具链,则应该下载它,但是您需要获得正确的平台-但是我想,因为您将库放在某个地方,所以知道它是32位还是64位。
更新2
这是MinGW软件包管理器的示例屏幕快照,显示了哪个软件包包含该库:
关于visual-c++ - libgcrypt.lib中无法解析的外部符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26401518/
如何指示 webpack 排除所有 d3 模块? // does not work externals: { "d3-*": "d3" } 所以如果应用导入了d3-submod
这个问题在这里已经有了答案: 9年前关闭。 Possible Duplicate: What does “outer =>” really mean? 我在哪里可以找到有关信息 trait After
这是一个简单的循环,我正在尝试对性能进行基准测试。 var extremeLoop=function(n){ var time=new Date() var t=0; for(
问题+概述 下面是两个片段,其中包含最初隐藏的 div,然后通过单击 button 和 jQuery 的 .show() 显示。两个 div 都具有由外部样式表应用的 display: grid; 样
我有一个 HTML 页面和一个单独的 .js 文件,该文件包含在带有 的页面中标签。 这是我的 .js 文件: element = document.getElementById("test");
我在 linux 静态库项目中有 3 个文件,我想在两个类方法实现文件中使用的静态字段存在链接问题。我有 class1.h、class1main.cpp 和 class1utils.cpp。 clas
我正在尝试将颜色背景更改为默认背景颜色,当我点击输入框外 我尝试使用“null”或“none”但没有用? window.addEventListener('click', outsideClick);
我正在编写一个应用程序,要求用户在手机上选择各种类型的文件。我使用此代码启动文件选择器 Intent : Intent intent = new Intent(Intent.ACTION_GET_C
在 android 中,不可移动(内部)的外部存储和内部存储有什么区别?我不确定在哪里保存我的数据。我只需要保存一个人可以随时提取的游戏统计数据 谢谢 最佳答案 在许多较新的设备中,将不再有物理区别,
在 C++ 中,假设我们有这个头文件: myglobals.h #ifndef my_globals_h #define my_globals_h int monthsInYear = 12; #en
我正在尝试使用 externs 在 C++ 中连接到 Ada。这两种实现有什么区别? 实现A namespace Ada { extern "C" { int getN
这个问题在这里已经有了答案: Get selected element's outer HTML (30 个答案) 关闭 2 年前。 想象一下我们有这样的东西: Hello World 如果我们这样
假设我在模块的顶部有这个: Public Declare Function getCustomerDetails Lib "CustomerFunctions" () As Long 如果我从 VB6
我目前正在使用这段代码: var wordRandomizer = { run: function (targetElem) { var markup = this.creat
我们正在使用 SVN 试水,并以 Beanstalk 作为主机。我们的设置如下所示: 存储库:模块 模块一 模块二 模块 3 存储库:网站1 自定义网站代码 svn:对模块 1 的外部引用 svn:对
有没有办法在负载均衡器中设置自动外部 IP 分配给像谷歌这样的服务? 我在裸机上运行 Kubernetes。 谢谢 最佳答案 使用 nodePort 类型的服务,它会将您的服务绑定(bind)到所有节
是否有可能在 Controller 之外使用 generateUrl() 方法? 我尝试在带有 $this->get('router') 的自定义存储库类中使用它,但它没有用。 更新 我在这里找到了一
我目前正在尝试通过 Webpack 外部对象外部化 Angular 依赖项来缩短构建时间。到目前为止,我已经为 React 和其他小库实现了这一目标。 如果我只是移动 '@angular/compil
我想创建一个自动应用其他插件的插件(外部插件)。这要求在我称为“应用插件”之前为插件设置构建脚本依赖项。但是似乎我无法在插件中添加buildscript依赖项,或者得到了: 您不能更改处于未解析状态的
我是R包的创建者EnvStats . 有一个我经常使用的函数,叫做 stripChart .我刚开始学习ggplot2 ,并在过去几天里仔细研究了 Hadley 的书、Winston 的书、Stack
我是一名优秀的程序员,十分优秀!