Monday, March 14, 2011

NDK and Cygwin 1.5

The latest Android NDK r5b does not support Cygwin 1.5 -- if you try to use it, it will detect it and abort.
One of my development boxes uses Cygwin 1.5 because I don't have a choice -- I use some software that doesn't build on 1.7 and it's complicated to try to run them side-by-side.

But fear not, there are ways.
First comment out the abort in line 170 of android-ndk-r5b/build/core/init.mk, and next run it with the NDK_USE_CYGPATH variable.

$ NDK_USE_CYGPATH=1 ~/android-ndk-r5b/ndk-build

The variable is necessary to help the ndk pass the right sources paths to gcc.
This makes the ndk build a tad slower, but as my project has only one source, it doesn't matter.

No comments:

Post a Comment