Search code examples
cobjective-cgccmultiplatformios

How to port a simple application (which uses only standard libc) to iPhone OS?


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?


Solution

  • 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!