2

I am trying to compile an open source library with Android NDK in Windows with cygwin.

According to following question

configure does not recognize androideabi

I think I should be able to do that but I can't. If I use

./configure --host=i686-android-linux

I got

 configure:3471: error: C compiler cannot create executables
 See `config.log' for more details

I guess configure would not know how to find that host, would it? Any idea will be appreciated.

Community
  • 1
  • 1
Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240

2 Answers2

0

Maybe you do not set the environment variables correctly.

Copied from $NDK/docs/STANDALONE-TOOLCHAIN.html:

export PATH=/tmp/my-android-toolchain/bin:$PATH
export CC=arm-linux-androideabi-gcc   # or export CC=clang
export CXX=arm-linux-androideabi-g++  # or export CXX=clang++
bjc
  • 103
  • 2
0

Configure often tests whether the compiler can perform certain tasks and creates executables to do these tests. If you are cross-compiling using the NDK toolchain, the executables it creates will not execute in the host environment thus raising an error.

There is probably a more eloquent solution, but in the past I have commented out the tests in the configure file which has allowed configure to continue on to create the make files.

Willem van Ketwich
  • 5,666
  • 7
  • 49
  • 57