Reason for including "-ObjC" in Xcode

We include “-ObjC” in other project parameter linker flags in Xcode, if we include any external libraries or frameworks, can someone tell me what the reason is and what it does if we include it.

Thanks at Advance ..

+4
source share
3 answers

This was well explained in the Apple QA1490 .

Key excerpts:

Objective-C does not define linker symbols for each function (or method, in Objective-C) - instead, linker symbols are generated only for each class.

...

, -ObjC . , Objective-C

+3

( Apple QA1490), , .

Objective-C - , , NSClassFromString() , C-, ( ), , , , , , NSSelectorFromString NSClassFromString.

xib/nib, : , , , nib. , .

, , - Obj-C , .

+1

-ObjC the linker flag causes the linker to ever load an object file into a library that defines an Objective-C class or category.

Xcode view

Why use the ObjC linker flag - Apple Documentation?

0
source

Source: https://habr.com/ru/post/1538678/


All Articles