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.)


Recommended Answers

All 2 Replies

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!

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.