There is a simple application written in C, which includes only standard C library functions (from stdio, stdlib, etc.) and Makefile+GCC to build it. Now, I wanna port it to iPhone OS for iPhone/iPads. Will it be seamless or are there any possible incompatibility issues?
views:
82answers:
2
+1
A:
you cannot simply compile your code for the iphone/ipad OS, seeing their apps are written in objective C. Good news though, you can use your C/C++ code in objective C, here is how to do it:
Introduction to The Objective-C Programming Language
So I suggest you start learning some objective C if you really want to port your app. Be warned that all that is UI will have to be re-written with the UIKit, in objective C.
oooo and also, you will need a mac!
David Menard
2010-06-16 15:01:06
Yes and No. You *can* just compile C code for the iPhone, because Objective-C *is* C. You may not be able to *use* all the things you're used to using (like reading from stdin, etc), but it will still compile...
Dave DeLong
2010-06-16 15:27:01
+3
A:
Your primary issue will be how the program displays its output - the support provided by the Standard C Library does not match what is expected of an iPhone application. You will have to work on those aspects of your program.
Jonathan Leffler
2010-06-16 15:01:54