MacOS and *OS Internals - Code Snippets
Note on compiling for iOS: I use the following shell script and call it "gcc-iphone":
# Do yourselves a favor and create a symlink to the mile long path of the SDK. Mine is:
# ls -l /iOSDeveloper
# lrwxr-xr-x  1 root  wheel  80 Mar 30 16:15 /iOSDeveloper ->
#   /Applications/
# If SIP won't let you do that, create in your own home dir as ~/iOSDeveloper. 
# Makes life so much easier.

export XCODE_DEVELOPER_USR_PATH="/Developer"
export SDKROOT="/Applications/"

# No longer needed : -sdk iphoneos gcc -arch arm64 -d__arm64__ \
# If you want to change this to armv7, just replace "arm64" below with armv7

/Applications/ -arch arm64 \
 -D__arm64__ \
 -DARM \

Forum About the Book Notes News Code Samples Downloads Resources Get the book from Amazon dock