Saturday, June 18, 2011

[OS X] opencv android woes…

So I’ve been trying to build the opencv library for android. First I tried using the experimental branch, which relies on the latest NDK r5b. However, after a couple of hours trying to get android-cmake to compile correctly, I realized my life is worth more than this… and now am using the customized android NDK r4 with enabled support of C++ exceptions, RTTI and Standard C++ Library (Crystax.net), and compiling opencv myself.

As a side-note, for some strange reasons, using NDK r5b my libraries (*.so) were on average 4x smaller than anything built using android-cmake. *AND* they worked, whereas the cmake’d ones would panic.


Anyhow…. I’ve checked out opencv from the svn, and came up on a strange error while compiling alloc.c (opencv_core module):

cc1plus: error: ~/opencv/android/../modules/index.rst/include: Not a directory


Solution? Check out your android-opencv.mk. One of the arguments is “$(OPENCV_ROOT)/modules/index.rst/include”. Remove that and you’re good to go…

No comments:

Post a Comment