Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用 C 语言编写了一个函数,我想在调试器中使用它来向 javascript 引擎发送命令。由于此函数未直接在代码中使用,因此链接器会删除此符号。有没有办法将特定功能标记为不被剥离?
找到了!
http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html
声明应该有
__attribute__((used))