1

我正在尝试使用 -static 交叉编译两个目标文件,但我收到一条错误消息。

/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -o launchd launchd.o syscalls.o -static
-nostartfiles -nodefaultlibs -nostdlib -Wl,-e,_main
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld_classic: launchd.o incompatible,
file contains unsupported type of section 3 (__TEXT,__picsymbolstub4) in load command 0 (must
specify "-dynamic" to be used)
collect2: ld returned 1 exit status

如果我尝试使用选项 -dynamic 运行它,那么我会得到...

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -o
launchd launchd.o syscalls.o -dynamic -nostartfiles -nodefaultlibs -nostdlib -Wl,-e,_main
ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures
Undefined symbols for architecture arm:
"_cp", referenced from:
  _main in launchd.o
ld: symbol(s) not found for architecture arm
collect2: ld returned 1 exit status

有人有什么想法可能是错的吗?谢谢!

4

0 回答 0