views:

2788

answers:

3

I've scanned over the (outdated) article that is the first hit on google about ARM cross-compiling. I've also seen the article about compiling OpenCV to the iPhone and the general cross compiling instructions there. My question is can I call the apparently already configured gcc/g++ in the iPhone developer package (which I already have installed) like in the latter article? A lot of the OpenCV stuff seems superfluous to my needs.

If I can, what would the calls look like? Should I create a Makefile to make things easier?

Also, I need -lncurses library. Can I call them like normal, or do I need to specify it's path because I'm not calling the default gcc/g++?

+4  A: 

If you're using the official SDK, compiling C++ for the iPhone is as simple as including cpp files in your project and hitting "build". Of course you can still go in and tweak the compiler switches - well, most of them.

As for ncurses, I'm not sure why you'd want to use that - but the only limitation you should have is that you can't link against dynamic libraries - so you'd have to linked the object code in.

Phil Nash
A: 

Unfortunately the [n]curses package is not going to do you any good for the iPhone.
[n]curses is designed to be used with a terminal window. This is just not available for the iPhone you will need to learn how to use Coco to develop a GUI interface.

Martin York
not if you go the SDK route - but there are terminal apps available on the jailbreak scene
Phil Nash
@Phil Nash: Yep. I was not considering that. The question then becomes have those terminals got the appropriate mappings defined inside ncurses?
Martin York