今天项目上遇到一个奇葩的问题
运行程序,报错
(lldb) p (char*)dlerror()
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
(char *) $0 = 0x0000000147e218c9 'dlopen(/Users/conanchen/client-delivery/Output/MAC64/Release/Fusion360.app/Contents/Libraries/Applications/Fusion/NaFusionUI10.dylib, 0x0001): Symbol not found: __ZTIN8Autodesk16ContentSe rviceUI10ISearchBoxE Referenced
from:
/Users/conanchen/client-delivery/Output/MAC64/Release/Libraries/Applications/Fusion/NaFusionUI10.dylib
Expected in:
/Users/conanchen/client-delivery/Output/MAC64/Release/Frameworks/AIRMAX/libContentService.dylib'
奇怪的是这货竟然可以编译过,怎么可能运行的时候找不到这个Symbol呢,让我怀疑人生,还以为发现了编译器的Bug。
conanchen@ConanChen ~ % c++filt __ZTIN8Autodesk16ContentSe rviceUI10ISearchBoxE
typeinfo for Autodesk::ContentServiceUI::ISearchBox
这个是个typeinfo。我开始想typeinfo是不是有什么特别。不懂的问题太多的时候,思路就混乱。
想从链接的时候找问题,先需要看看到
运行程序,报错
(lldb) p (char*)dlerror()
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
(char *) $0 = 0x0000000147e218c9 'dlopen(/Users/conanchen/client-delivery/Output/MAC64/Release/Fusion360.app/Contents/Libraries/Applications/Fusion/NaFusionUI10.dylib, 0x0001): Symbol not found: __ZTIN8Autodesk16ContentSe
奇怪的是这货竟然可以编译过,怎么可能运行的时候找不到这个Symbol呢,让我怀疑人生,还以为发现了编译器的Bug。
conanchen@ConanChen ~ % c++filt __ZTIN8Autodesk16ContentSe
typeinfo for Autodesk::ContentServiceUI::ISearchBox
这个是个typeinfo。我开始想typeinfo是不是有什么特别。不懂的问题太多的时候,思路就混乱。
想从链接的时候找问题,先需要看看到
