问题
I try to compile library and get debug symbols with "DWARF with dSYM File" format. This works for dynamic but not for static libraries.
XCode "Quick help" says that "dSYM file is not needed and will not be created for static library or object file products). [dwarf-with-dsym]"
Can anyone explain why?
Thx
回答1:
I stumbled across this and hope to shed some light on the same
Since a static library is not really an executable it will still contain the symbols in it. So there is no point of a dSYM, when this library will in turn used by another application then there will be a dSYM containing the symbols of the application and the symbols of your static framework.
Dynamic framework on the other hand is an executable in itself in the sense that it is ready to be loaded into an application and liking has already happened on it. So all the symbols of your library have been converted into machine code already, but there is a dSYM which will contain the mapping of your symbols.
Added this for some poor soul like me, lmk if I need to explain this further.
来源:https://stackoverflow.com/questions/50604249/why-does-not-xcode-generate-dsym-for-static-library