链接目标文件失败符号未找到

时间:2013-09-09 00:06:37

标签: assembly ld

我正在使用nasm汇编程序然后使用ld链接它已经工作到今天我收到此错误

$ ld -macosx_version_min 10.8.0 -o objctest.o -lSystem
ld: warning: -arch not specified
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     -u command line option
ld: symbol(s) not found for inferred architecture x86_64

汇编代码

global  _main

align 4, db 0x90

section .text
_main:
push ebp
mov  ebp, esp
mov eax, 88
mov esp, ebp
pop ebp
ret

0 个答案:

没有答案