Show Menu
Cheatography

Build-related concepts and utilities. Cheat Sheet by

clang - Control the process of build

Compile the source only
clang -c TestOb­ject.m
Pass extra link args -ObjC
clang -Wl,"-O­bjC­" -framework Foundation -weak_­fra­mework System main.m App.m TestOb­jec­tLib.a -o app
Link a static library named TestOb­­je­c­t­Lib.a
clang -framework Foundation -weak_­fra­mework System main.m App.m TestOb­jec­tLib.a -o app

ar - Manage static library

Create a static lib named TestOb­jec­tLib.a
ar -rcs TestOb­jec­tLib.a TestOb­ject.o TestOb­jec­t+Ext.o
List all the object files in the static lib
ar -t TestOb­jec­tLib.a
List the specific file TestOb­ject.o in the static lib
ar -t TestOb­jec­tLib.a TestOb­ject.o
1. We can omit the - symbol before ar options.

ld - Linker

Link the object files into a binary
ld -ObjC -framework Foundation -weak_­fra­mework System main.o App.o TestOb­jec­tLib.a -o app
 

lipo - create or operate on universal files

Display a brief descri­ption of the library
lipo -info TestOb­jec­tLib.a

xcrun - Run or locate develo­pment tools

codesign - Manipulate code signatures

 

xcodebuild -- build Xcode projects and workspaces

 
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Regular Expressions Cheat Sheet
          PHP Cheat Sheet
          Python Cheat Sheet