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 Test­Ob­­jec­­tL­ib.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 Test­Obj­ect­Lib.a
ar -rcs TestOb­jec­tLib.a TestOb­ject.o TestOb­jec­t+E­xt.o
List all the object files in the static lib
ar -t TestOb­jec­tLib.a
List the specific file Test­Obj­ect.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

 

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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