HLA (Higher Level Assembly) Installation and Linker

痴心易碎 提交于 2019-12-06 03:45:54

问题


I am trying to install the executalbles to compile programs in HLA on a Mac OS 10.8. Although the tools seem to be in the right place and working I am getting the following error when trying to compile the first program

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

The hla executalbe seems to output the object file but something in the linker seems to not be working. I have previously managed to install it on other machines but in most cases I get this error.

Any ideas?


回答1:


You can tell HLA to use "_main" as the entry point by using "-main:_main". You may also need to link with libSystem.dylib and get rid of some linker warnings, so that the whole command would be

hla -main:_main -l"macosx_version_min 10.9" -l"lSystem" -l"no_pie" source.hla



来源:https://stackoverflow.com/questions/20053784/hla-higher-level-assembly-installation-and-linker

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!