Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Build Phases -> Link Binary with Libraries or Build Settings -> Linker Flags

What's the difference between Build Phases -> Link Binary with Libraries or Build Settings -> Linker Flags?

The former does not seem to allow you to specify between Debug vs Release, and the frameworks specified within it also don't seem to match up with the latter.

Note: I have checked existing posts on SO, haven't found one that answers this accurately.

like image 557
Boon Avatar asked Feb 07 '17 21:02

Boon


1 Answers

Xcode translates libraries in Build Phases – Link Binary With Libraries into linker flags: -lsome or -framework Some.

Build Phases is a somewhat abstract view on build process. You have this linker step listed here, but it is one-way – it doesn't reveal what is already there for linker in Linker Flags, it only adds new flags to linker.

"Optional" libraries translate to weak linking: -weak-lsome and -weak_framework Some

like image 123
paiv Avatar answered Oct 01 '22 06:10

paiv