“start”,引自:-u命令行选项ld:未找到符号

时间:2013-04-11 10:07:40

标签: linker ld

我尝试从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

通常情况下,当缺少库时,会显示此消息,但我怎样才能找到哪一个?我很确定,源代码没有问题。

1 个答案:

答案 0 :(得分:1)

-arch armv7 -isysroot -L $(SDK)-L $(SDK)/ usr / lib / system