Compiling C Code To Run In Mobile Terminal

Discussion in 'Mac Programming' started by Marjamrob1, Dec 12, 2012.

  1. macrumors regular

    Joined:
    Jul 19, 2012
    #1
    I wrote a simple C program that takes an equation in y intercept an creates a table. My math teacher offered me extra credit to show it to her.I would perfer to do it on my iPad, as opposed to a computer. So how can I compile that for use with Mobile Terminal on my iPad, so it will run to show my teacher? I have Xcode 4.2, and GCC so what should I do?
     
  2. thread starter macrumors regular

    Joined:
    Jul 19, 2012
    #2
    Anyone? Sorry, I'm impatient I just have to have this done by tomorrow.
     
  3. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    My immediate inclination is:
    ssh from Mobile Terminal to a machine you can run your program on
    I'm sure there's documentation for getting tools installed in Mobile Terminal but I don't know how to do it, and me looking it up is no more useful than you looking it up. Also I think general jailbreaky stuff is in a grey area on the forums.

    Also... There's still a place for computers. You didn't write, test, and debug this code on your iPad. Running it on one for show is fine, but honestly... you know how to run it in your computer, and you don't know how to on your iPad. Learning is great, so learn! By all means. But maybe it's better to just show your teacher on a computer, get your extra credit, then figure out the iPad hootenanny.

    Care for us to review your code?

    -Lee
     
  4. thread starter macrumors regular

    Joined:
    Jul 19, 2012
    #4
    Sure i will upload it later. I ended up using the interpreter on the appstore though.
     
  5. macrumors regular

    Joined:
    Jun 29, 2010
    Location:
    The Netherlands
    #5
    Wait, there's a C interpreter on the App Store? Is it offline?
     
  6. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    This appears to below-board, Cydia, jailbreaky stuff. That's fine, but some don't go in for that stuff.

    -Lee
     
  7. thread starter macrumors regular

    Joined:
    Jul 19, 2012
    #7
    Refering to this, on the appstore.
    https://itunes.apple.com/app/id445292818

    Works well enough, apparently not banned since it "interprets and doesn't actually install the program."
     
  8. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #8
    Interesting. My mistake, the mobile terminal stuff led me astray. Apologies for any improper characterization. A C interpreter seems like a quirky app, but I guess it makes sense that it passes muster.

    -Lee
     
  9. thread starter macrumors regular

    Joined:
    Jul 19, 2012
    #9
    Yes, there is also a Python and a Lisp one as well.
     

Share This Page