w64-Mingw LLVMSupport.a:对 __imp_* 的未定义引用 [英] w64-Mingw LLVMSupport.a : undefined reference to __imp_*
问题描述
试图将某些内容链接到 LLVMSupport 的非常奇怪的错误:
Quite weird bug trying to link something to LLVMSupport :
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x524): undefined reference to `__imp_SymSetOptions'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x542): undefined reference to `__imp_SymInitialize'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x576): undefined reference to `__imp_SymGetModuleBase64'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x582): undefined reference to `__imp_SymFunctionTableAccess64'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x5a1): undefined reference to `__imp_StackWalk64'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x644): undefined reference to `__imp_SymGetModuleBase64'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x6f4): undefined reference to `__imp_SymGetSymFromAddr64'
C:/projects/builds/LLVM-3.3/lib/../lib/libLLVMsupport.a(Signals.cpp.obj):Signals.cpp:(.text+0x7d9): undefined reference to `__imp_SymGetLineFromAddr64'
dbghelp.dll 中存在同名函数http://msdn.microsoft.com/en-us/library/windows/desktop/ms681327%28v=vs.85%29.aspx
there are functions with similar names in dbghelp.dll http://msdn.microsoft.com/en-us/library/windows/desktop/ms681327%28v=vs.85%29.aspx
但是链接到这个库并不能修复它.
but linking to this lib doesn't fix it.
这个问题我已经有一段时间了......如何解决它?
I've been on this problem for a while... How to fix it ?
注意:我已经用带有补丁的 SEH 和 64 位的 cmake + mingw64 编译了 llvm,以强制进行正确的 EH 方法测试.
Note : I've compiled llvm with cmake + mingw64 in 64 bits with SEH with a patch to force a correct EH method test.
然后我找不到这些符号在哪里使用...
Then I can't find where these symbols are used...
推荐答案
MinGW 自带实现,只是在命令的末尾添加 -limagehlp(顺序很重要)
MinGW comes with its own implementation, just to add -limagehlp at the end (the order matters) of the command
这篇关于w64-Mingw LLVMSupport.a:对 __imp_* 的未定义引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!