当我尝试编译程序时,出现问题
我的步骤:
1)hlaparse -v -sg -test“ p2.hla”
2)hla -v p2
Linking via [ld -arch i386 -o "p2" "p2.o" "/Users/( ͡° ʖ̯ ͡°)/Desktop/hla/a/hlalib.a"]
ld: warning: No version-min specified on command line
ld: warning: -macosx_version_min not specified, assuming 10.11
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Undefined symbols for architecture i386:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture i386
Error returned by ld = 256
编辑:
之后:
hla -main:_main -l"macosx_version_min 10.9" -l"lSystem" -l"no_pie" p2.hla
我收到了:
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
编辑2: 无论警告如何,它都有效。谢谢