在 Iphone 模拟器或终端中运行 gcc 可执行文件

发布于 2024-07-21 09:40:41 字数 221 浏览 2 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小帐篷 2024-07-28 09:40:41

可悲的是没有。

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.

淡忘如思 2024-07-28 09:40:41

不,因为模拟器仍在英特尔上运行。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文