在 Iphone 模拟器或终端中运行 gcc 可执行文件
我有一个 helloworld.c 文件,其内容为:
#include "stdio.h"
main{ printf"Hello World\n");}
我使用 arm-apple-darwin-gcc-4.0.1 工具链对其进行编译并创建一个 hello.out 可执行文件。
我可以在 iPhone 模拟器/终端上运行这个可执行文件吗?
I have a helloworld.c file, with the contents :
#include "stdio.h"
main{ printf"Hello World\n");}
I compile it using the arm-apple-darwin-gcc-4.0.1 toolchain and create a hello.out executable.
Can i run this execuatble on iPhone Simulator / terminal ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可悲的是没有。
C 编程语言的发明者 Kernighan 和 Ritchie 曾在 AT&T 贝尔实验室工作。
“Hello World”是 AT&T 的合法商标,不允许在其网络上使用。
Sadly, no.
Kernighan and Ritchie, inventors of the C programming language used to work at AT&T Bell Labs.
"Hello World" is a legal trademark of AT&T and is not allowed on their network.
不,因为模拟器仍在英特尔上运行。 arm 编译器正在生成 ARM 可执行文件。 此外,您需要为模拟器制作一个 .app 捆绑包才能识别该应用程序。
No, because the simulator is still running on Intel. The arm compiler is making an ARM executable. Additionally, you'd need to make a .app bundle for the simulator to recognize the application.