我尝试从 Jonathan Zdziarski 的“黑客和保护 iOS 应用程序”一书中构建一个示例,编译一个包含大量对象文件的示例。但是在编译二进制文件时:
export PLATFORM=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
$PLATFORM/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -o launchd launchd.o syscalls.o -static -nostartfiles -nodefaultlibs -nostdlib -W1,-e,_main
终端说:
Undefined symbols for architecture armv7:
"start", referenced from:
-u command line option
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
通常,当缺少库时,会显示此消息,但是我如何找出是哪一个?我很确定,源代码没有问题。