• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

C compiler for iphone 3GS/4

Hi there;

I want to implement and compile simple console applications of C programming language in my Iphone 3GS/4.

Possible?
if so; Apps?


Regards.
0
jazzIIIlove
Asked:
jazzIIIlove
  • 5
  • 4
4 Solutions
 
pgnatyukCommented:
If you know how to create any iPhone application, for example, Window-based application, so you can modify it and make a non-GUI application.

1. In Xcode you create new project with Window-based application  template (for iPhone). Choose a name, for example "ConsoleApp".
2. Delete MainWindow.xib file, delete ConsoleAppAppDelegate.h and .m files.
3. In ConsoleApp-Info.plist delete the last line "Main nib file based name".
4. Delete the line with UIApplicationMain call. Change the last line 'return 0;' instead of 'return retVal;'
5. Write the program in the main.m file. For example, add printf("Hello");


#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {
    
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    printf("hello");
    [pool release];
    return 0;
}

Open in new window

0
 
jazzIIIloveAuthor Commented:
What I want it that writing and compiling the application in my IPhone not in a computer.


Kind regards.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
jazzIIIloveAuthor Commented:
Hi there;

I have seen that program but the issue is that everyone seems to complain about the header file inclusion. So, any tricks?

Or have you tried for it?

Regards.
0
 
jazzIIIloveAuthor Commented:
Hi there;

ok, I even couldn't find the app in appstore so where is it in appstore? or how can I find this to try?

Kind regards.
0
 
pgnatyukCommented:
AppStore?
I think,  in this case it's even forbidden to think about the AppStore.
I do not want to compile any program on iPhone. Just because this particular problem is not interesting for me.
I heard about this trick a year ago and so found something similar and posted a link for you.
0
 
jazzIIIloveAuthor Commented:
Ok, so the only way is that I must do the jailbreaking thing...Right?

Regards.
0
 
pgnatyukCommented:
Yes, this terminal-style compiler is supposed to work only on the jailbroken phone.
Maybe, one day someone will make an editor and a C-compiler for iPhone. I do not know why. Maybe, for iPad?
0
 
jazzIIIloveAuthor Commented:
Sounds good for an ipad.

Regards.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now