尝试将某些内容链接到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
但是链接到这个lib并没有解决它。
我已经解决了这个问题一段时间......如何解决?
注意: 我已经用64位的cmake + mingw64编译了llvm,其中包含SEH和补丁以强制进行正确的EH方法测试。
然后我无法找到这些符号的使用位置......
答案 0 :(得分:2)
MinGW有自己的实现,只是为了在命令的末尾添加-limagehlp(命令很重要)