I'm trying to link in all unreferenced symbols from a few static libraries (my own libraries) for my C++ xcode app. I have tried all the properties related to 'strip' (by searching the properties for 'strip'), but the unreferenced symbols, specifically classes, are not linked in.
I have also tried the -r linker flag, but then the linker only complains with:
'ld: -r and -dead_strip cannot be used together'
I have tried adding '-no_dead_strip' to the linker flags, but then the linker just tells me
'-no_dead_strip' is ignored.
I get the same results with both 'Apple LLVM' and 'LLVM GCC'.
So, my question is: what linker flag(s) or target properties should I use to switch off all dead code stripping and force unreferenced classes to be linked in?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…