链接器错误:LNK2022
我正在尝试在具有公共语言运行时支持的项目中使用升压线程。我收到以下链接器错误。错误 LNK2022:元数据操作失败 (8013119F):存在 TypeRef,它应该但没有相应的 TypeDef: (dummy): (0x01000073)。
如果我评论实例化升压线程的行,我不会收到任何链接器错误。
我尝试在网上查找修复此错误的方法,在一个这样的地方,建议在包含任何 boost 库之前使用“#define BOOST_THREAD_USE_DLL”。我尝试了这个,但它仍然给我同样的错误。
有一个相关的线程,(“LNK2022:元数据操作失败”让我发疯< /a> )但这不是同一个问题,而是有些相似。我尝试了那里建议的修复,但仍然没有运气。
有谁知道如何解决这个问题?
I am trying to use boost threads in a project having common language runtime support. I get the following linker error. error LNK2022: metadata operation failed (8013119F) : A TypeRef exists which should, but does not, have a corresponding TypeDef: (dummy): (0x01000073).
If i comment the line instantiating the boost thread, i do not get any linker error.
I tried looking online for fixing this error, at one such place it was suggested to use " #define BOOST_THREAD_USE_DLL" before including any boost libraries. I tried this but it still gives me the same error.
There is a related thread, ( "LNK2022: metadata operation failed" driving me insane ) but it isnt the same problem but somewhat similar. I tried the fix suggested there but still no luck.
Does anyone know how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这对我有帮助
This helped me
就我而言,使用 OpenCV 4.1.1 时出现类似的错误。
VS2019还可以,VS2015就不好了。错误信息是这样的。
我在 OpenCV 包含文件中搜索了名为“Impl”的结构或类。
然后我可以避免在 #include opencv 标头下添加以下代码的错误。
这里的答案对我非常有帮助。谢谢。
In my case, similar error occurred when using OpenCV 4.1.1.
VS2019 is OK, but VS2015 is not good. Error message is like this.
I searched struct or class named "Impl" in OpenCV include files.
Then I could avoid the error adding the follow codes just under #include opencv headers.
Answers in here were very helpful for me. Thank you.
Visual Studio 不支持右值引用。仔细检查您的升压配置选项,以确保您使用的是正确的工具集。 (请参阅 boost 文档)
另外,请确保您拥有当前版本的 boost。
-保罗H
Visual Studio doesn't support r-value references. Double-check your boost configuration options to make sure you're using the correct toolset. (see the boost documentation)
Also, ensure you have the current version of boost.
-PaulH