📜 ⬆️ ⬇️

Gcc on iPhone

On the iPhone, you can run the gcc compiler. Thanks comrades Sauriku and iGuga iGuga.


1. Install Cydia : Go to Settings -> General -> Auto-Lock -> Never .
In the Installer, add the resource apptapp.saurik.com .
Go to Install -> System -> Cydia Packager .
Install. You will have to wait 8-10 minutes. Cydia will transfer applications, image, etc. in a larger section of the iPhone, thereby freeing up space for installing the program.

2. Go to Cydia . Click on the right top of the semicircle (updates the resources) and install the GNU C compiler from the Development section.
')
3. From the Terminal Support category, install MobileTerminal .

4. Download the official iPhone SDK .

5. On the iPhone, delete the /usr/lib/gcc/arm-apple-darwin8/4.2.1/include folder.

6. From the official iPhone SDK, copy the include folder and paste it into the iPhone in the /usr/lib/gcc/arm-apple-darwin8/4.2.1/ folder.

7. Writing a test c-file:

#include <stdio.h>

int main ()
{
printf ("Hello world! \ n");
return 0;
}

Let's call it test.c

8. We throw on the iPhone (for example, in the / var / mobile folder).

9. Go to the Terminal on the iPhone.

10. Go to this directory: cd / var / mobile .

11. Compile: gcc -o test test.c

12. Run: ./test

14;-). We see in the terminal:

Hello world!

15. Uncork the champagne.

Source: https://habr.com/ru/post/23962/


All Articles