C programming in IOS?


I am implementing an image editing program in C which should work both in Windows, IOS (iDevices). Ths point is that we do not want to re-write same code in Object-C or Xcode.

Let's say that we have a C program that is just resizing an input image by half. The program should be with some OpenCV librarie files.
We know it can be compiled and built in Windows with MinGW. But is there a way to compile and build same project files to run within iDevices? (This is supposed to be called from an iPhone application.)


Have you tried using blocks? They allow you to embed C code in what is essentially a black box routine. It's not going to cross-compile a C program to Obj-C, but if your goal is to reuse some existing code, this may do the trick. Here are some articles on blocks:


However, if all you are doing is resizing an image, there is enough sample code out there to get the job done quickly in Obj-C. Just search on 'iOS resize an image'. Good luck!