Results 1 to 7 of 7
  1. #1

    Retired Prophet
    ToxicJew.'s Avatar
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,809
    Points
    7,616
         User Info     Contact     Gamer ID
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,809
    Points
    7,616

    Contact info:

    Youtube Channel: http://www.youtube.com/kennethbgoodin

    Default C/C++ Compiler on iOS.

    The C language is great because its one of the most used today and has compilers widely available for most architectures. The propose of this post is to explain how to compile your own C/C++ projects under the new iOS versions like 4, 5.x and (possibly) 6.



    Nowadays, compiling C/C++ for iPhone, isnt to easy like before, there are three major problems:

    - No LibGCC available on Cydia. The famous GCC Compiler has been ported to the iPhone (you can found it as GNU C Compiler on Cydia). GCC depends on LibGCC witch is no longer available on Cydia (since iOS 2.0) so its impossible to install CGG.

    - The C Standard Library is not completely installed on iOS.

    - Apple Code Sign. Saurik has already explain that:

    Quote Originally Posted by Saurik
    Starting with the recent beta releases of the iPhoneOS, Apple has started requiring that all code on the device is signed. This is mostly to make it impossible for programs running through Apples AppStore to download more software and run it (so no competition for AppStore).
    Fortunately right now theres an open source project that aims to port GCC and its dependencies to the iPhone. The project is called iPhone-GCC-Full.

    To start youll need to get some components:



    After downloading those components, launch Cyberduck or your favorite SFTP software and upload the files into /private/var/root on your iPhone.




    Now, connect to your iPhone via SSH using Terminal in your Mac (or a Windows equivalent of Terminal) and install the downloaded packages with the following commands:

    Code:
    your-mac:~ you$  ssh [email protected]
    
    [email protected]s password: :    // The default password is alpine
    
    your-iphone:~ you$ dpkg -install libgcc.deb
    
    your-iphone:~ you$  dpkg -install iphone-gcc.deb
    
    your-iphone:~ you$  dpkg -install headers-libs.deb
    Now you can compile your applications like you do in your computer, by issuing for example: cpp -o helloworld helloworld.c.

    After compiling if you try to run your app iPhone just says Killed when you launch it! This is Code Sign working In order to solve this issue its necessary to sign the application. There are 3 options to sign apps or make it run but, the best option is called Pseudo-Signing:

    Quote Originally Posted by Saurik
    To get around this, I wrote a tool called ldid that, among other things, can generate the SHA1 hashes that are checked by Apples iPhoneOS kernel
    - (The other signing options are here).



    Issue the following on your iPhone Terminal:

    Code:
    your-iphone:~ you$ ldid -S helloworld
    Now if you try to run your app it will work!! Enjoy the freedom of having your small or huge utilities running in your pocket anytime you need them! Dont forget to install MobileTerminal to run your Apps.



    Credits to iKlive Networks for the tutorial.

    0 Not allowed! Not allowed!
    ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้ส็็็็็็็็็็็็็็็็็็็็ ็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้

  2. #2
    Josh's Avatar

    Badge

    Join Date
    Dec 2009
    Location
    Florida .
    Posts
    10,474
    Points
    11,219
         User Info     Contact     Gamer ID
    Join Date
    Dec 2009
    Location
    Florida .
    Posts
    10,474
    Points
    11,219

    Default C/C++ Compiler on iOS.

    This makes me wish I knew the C language .

    0 Not allowed! Not allowed!
    Collabo with my boi Artemis :3



  3. #3

    Retired Prophet
    ToxicJew.'s Avatar
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,809
    Points
    7,616
         User Info     Contact     Gamer ID
    Join Date
    Mar 2011
    Location
    S̢͎̳̞̲͈̪̳̻ͮͩt̟̳̏ͬ̔&#
    Posts
    7,809
    Points
    7,616

    Contact info:

    Youtube Channel: http://www.youtube.com/kennethbgoodin

    Default

    I'm currently learning C. I have a pretty general knowledge of it from working with Obj-C, but learning the language itself should help me grasp Obj-C better.

    Pick up a few books on it, it's not that hard.

    0 Not allowed! Not allowed!
    ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้ส็็็็็็็็็็็็็็็็็็็็ ็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้

  4. #4
    Josh's Avatar

    Badge

    Join Date
    Dec 2009
    Location
    Florida .
    Posts
    10,474
    Points
    11,219
         User Info     Contact     Gamer ID
    Join Date
    Dec 2009
    Location
    Florida .
    Posts
    10,474
    Points
    11,219

    Default C/C++ Compiler on iOS.

    Haven't had the time recently actually but will do. Soon I shall be smart

    0 Not allowed! Not allowed!
    Collabo with my boi Artemis :3



  5. #5
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,845
    Points
    3,185
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,845
    Points
    3,185
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    This is where that modding Wii shit comes in handy.
    Actually helped me learn C++.

    0 Not allowed! Not allowed!





  6. #6
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,982
    Points
    5,119
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default C/C++ Compiler on iOS.

    Go to cprogramming.com for C++ and java, it's where I learned!


    Sent from my iPod touch in NukeTown 2025

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  7. #7
    Nooblet
    Join Date
    Dec 2014
    Posts
    1
    Points
    1
         User Info     Contact     Gamer ID
    Join Date
    Dec 2014
    Posts
    1
    Points
    1

    Contact info:

    Youtube Channel: http://www.youtube.com/

    Default

    I'd like to suggest CppCode. It's the first and the only offline C/C++ IDE & Compiler on iOS!
    No jailbreak required, no internet connection required, no ads, free(mium) app.

    App feature list, screenshots and video on Vimeo/Youtube and even quick start at http:[slash][slash]cppcode[dot]info

    0 Not allowed! Not allowed!

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 08:40 PM.
Powered by vBulletin®
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.