我在通过 cygwin 在 Windows 上编译 pjsip 时遇到问题。我尝试使用 pjsip 形式的 android branc http://svn.pjsip.org/repos/pjproject/branches/projects/android/ 和适用于 Windows 的 Android NDK r8c。
这是我尝试配置 pjsip 时的输出。
$ ./configure-android
configure-android: APP_PLATFORM not specified, using android-14
configure-android: TARGET_ABI not specified, using armeabi
configure-android: calling ./configure with env vars:
CC = /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc
CXX = /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-g++
CFLAGS = -I/ndk/platforms/android-14/arch-arm/usr/include
CXXFLAGS = -shared --sysroot=/ndk/platforms/android-14/arch-arm
LDFLAGS = -nostdlib -L/ndk/platforms/android-14/arch-arm/usr/lib/
LIBS = -lc -lgcc
checking build system type... i686-pc-cygwin
checking host system type... arm-unknown-linux-androideabi
checking target system type... arm-unknown-linux-androideabi
checking for arm-linux-androideabi-gcc... /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc
checking whether the C compiler works... no
aconfigure: error: in `/pjsip-android':
aconfigure: error: C compiler cannot create executables
See `config.log' for more details
这是 config.log 的摘录
aconfigure:2490: result: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc
aconfigure:2759: checking for C compiler version
aconfigure:2768: c:\Development\cygwin\ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc.exe --version >&5
./aconfigure: line 2770: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc: Permission denied
aconfigure:2779: $? = 126
aconfigure:2768: c:\Development\cygwin\ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc.exe -v >&5
./aconfigure: line 2770: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc: Permission denied
aconfigure:2779: $? = 126
aconfigure:2768: c:\Development\cygwin\ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc.exe -V >&5
./aconfigure: line 2770: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc: Permission denied
aconfigure:2779: $? = 126
aconfigure:2768: c:\Development\cygwin\ndk\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gcc.exe -qversion >&5
./aconfigure: line 2770: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc: Permission denied
aconfigure:2779: $? = 126
aconfigure:2799: checking whether the C compiler works
aconfigure:2821: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc -I/ndk/platforms/android-14/arch-arm/usr/include -I/ndk/platforms/android-14/arch-arm/usr/include -nostdlib -L/ndk/platforms/android-14/arch-arm/usr/lib/ conftest.c -lc -lgcc >&5
./aconfigure: line 2823: /ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc: Permission denied
aconfigure:2825: $? = 126
aconfigure:2863: result: no
谁能告诉我如何解决这个问题......