如何在越狱的iPhone上运行一个简单的HelloWorld程序?
我创建了一个 HelloWorld 程序,并将其编译为 mach-o 文件。然后,我通过 SSH 将其上传到我的越狱 iPhone 上。
我用 root 帐户登录。然后,我尝试通过运行 ./HelloWorld 来执行该程序 但是,我收到了“权限被拒绝”
我的 HelloWorld 程序非常简单: #包括
int main()
{
printf("Hello World");
return 0;
}
任何帮助吗?
谢谢。
I created a HelloWorld program, and compile it to a mach-o file. Then, I uploaded it to my jailbreak iphone via SSH.
I login with root account. Then, I tried to execute this program by running ./HelloWorld
However, I received a "Permission denied"
My HelloWorld program is very simple:
#include
int main()
{
printf("Hello World");
return 0;
}
any help?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要使程序可执行。有一个教程 http://www.ipodstudios.com/how-to-chmod关于如何为 iPod 执行此操作。我想这也适用于 iPhone。
You need to make the program executable. There is a tutorial http://www.ipodstudios.com/how-to-chmod on how to do this for the ipod. I imagine this would also work for the iphone.
您需要一个适用于 iPhone 的交叉编译器,以便能够在 Mac 上编译它并在 iPhone 上运行它。我相信有一个工具链可以做到这一点。或者,如果您对越狱开发感兴趣,可以使用 Theos。
You'd need a cross compiler for the iPhone in order to be able compile it on your Mac and run it on the iPhone. I believe there is a tool chain for that. Alternatively, use Theos if you are interested in jailbreak development.