?
Solved

C compiler for iphone 3GS/4

Posted on 2011-09-30
9
Medium Priority
?
423 Views
Last Modified: 2012-05-12
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
Comment
Question by:jazzIIIlove
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 2000 total points
ID: 36895963
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
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36897321
What I want it that writing and compiling the application in my IPhone not in a computer.


Kind regards.
0
 
LVL 33

Assisted Solution

by:pgnatyuk
pgnatyuk earned 2000 total points
ID: 36898709
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36899144
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
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36899159
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
 
LVL 33

Assisted Solution

by:pgnatyuk
pgnatyuk earned 2000 total points
ID: 36899166
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
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36899438
Ok, so the only way is that I must do the jailbreaking thing...Right?

Regards.
0
 
LVL 33

Assisted Solution

by:pgnatyuk
pgnatyuk earned 2000 total points
ID: 36899450
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
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36899471
Sounds good for an ipad.

Regards.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question