網頁

2015年2月20日 星期五

iOS開發筆記 - What is ObjC

之前老是在Other linker flags設定-ObjC,總是不大懂為什麼,查了下,在Technical Q&A QA1490 - Building Objective-C static libraries with categories中提到如下:

The -ObjC Linker Flag

Passing the -ObjC option to the linker causes it to load all members of static libraries that implement any Objective-C class or category. This will pickup any category method implementations. But it can make the resulting executable larger, and may pickup unnecessary objects. For this reason it is not on by default.
看起來簡單的解釋是:要載入其他用Objective-C寫的靜態library,要設定這個flag。而這個flag也有造成執行檔肥大的問題。

這倒讓我想到那有可能不用這個設定嗎???

參考網址:
What does the -ObjC linker flag do?
Technical Q&A QA1490 - Building Objective-C static libraries with categories

沒有留言:

張貼留言