我正在尝试安装可执行文件以在Mac OS 10.8上编译HLA中的程序.虽然工具似乎在正确的位置和工作,我在尝试编译第一个程序时收到以下错误
ld: warning: -macosx_version_min not specified, assuming 10.8
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
Run Code Online (Sandbox Code Playgroud)
hla executalbe似乎输出了目标文件,但链接器中的某些内容似乎无法正常工作.我以前设法在其他机器上安装它,但在大多数情况下我得到这个错误.
有任何想法吗?
小智 10
您可以通过使用"-main:_main"告诉HLA使用"_main"作为入口点.您可能还需要链接libSystem.dylib并删除一些链接器警告,以便整个命令
hla -main:_main -l"macosx_version_min 10.9" -l"lSystem" -l"no_pie" source.hla
| 归档时间: |
|
| 查看次数: |
672 次 |
| 最近记录: |