[SOLVED] Qt 5.4 Android Windows - stdlib.h: No such file
-
Problem occurs due compilation of Qt 5.4 Alpha for Android target on Windows 8.1 dev machine
@configure.bat -developer-build -platform win32-g++ -opengl es2 -xplatform android-g++ -android-ndk C:\Android\android-ndk-r10 -android-sdk C:\Android\adt-bundle-windows-x86_64-20140702\sdk -android-toolchain-version 4.8 -opensource -confirm-license -nomake tests -nomake examples@
@mingw32-make.exe@
@C:/Android/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.8/include/cstdlib:72:
20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.@Used for configuration:
NDK Version: R10
SDK Version: adt-bundle-windows-x86_64-20140702ANDROID_NDK_PLATFORM=android-9
ANDROID_TARGET_ARCH=armeabi-v7a
ANDROID_BUILD_TOOLS_REVISION=17.0.0
ANDROID_NDK_HOST=windows-x86_64Any ideas are welcome :)
-
I have the same problem here, in Ubuntu 14.04 64 bit:
@./configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk $ANDROID_NDK_ROOT -android-sdk $ANDROID_SDK_ROOT -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform 10 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -opensource -confirm-license -v@
NDK version: r10b
SDK Version: adt-bundle-linux-x86_64-20140702 -
Did u try with 32 bit ndk ? Gene really we tend to use 64 bit? This creates issue while building. From command line it looks you are using 64 bit ndk.
-
Do you mean android-ndk32-r10b-linux-x86_64.tar.bz2?
I don't get the difference. Does android-ndk64-r10b-linux-x86_64.tar.bz2 (in which I've used) supposed to build for 64 bit arm target?
Is it a bug or misconfiguration or maybe both?P.S: exact same configure command did not work with ndk32. I get:
Can not detect Android NDK toolchain. Please use -android-toolchain-version to specifyFor toolchain version 4.8, it finds stdio.h, but it can't find other headers like math.h.
-
Yes and Yes. It is not bug or misconfiguration. Since we are using 32 bit, we should use it. Emulator is also 32 bit. So we need to use 32 bit.
-
I still can not fix this, even when I tested both of ndk32 and ndk64. I use this howto:
http://qt-project.org/wiki/Qt5ForAndroidBuilding
I get this error using ndk64 (ndk32 gives the same result)
@ANDROID_NDK_PLATFORM=android-10rb ../../configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk $ANDROID_NDK_ROOT -android-sdk $ANDROID_SDK_ROOT -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform 10 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -opensource -confirm-license@
@fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
make: *** [arch.o] Error 1
Unable to determine architecture!
Turn on verbose messaging (-v) to see the final report.
Determining architecture... ()@and further:
@g++ -o arch arch.o
Found architecture in binary
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'unknown'
Host architecture: 'x86_64'@when I use verbose mode.
I think the problem comes from the "unkown architecture" above.
-
Now I am using 32 bit adt (adt-bundle-linux-x86-20140702) and NDK 32 (android-ndk32-r10b-linux-x86_64), but the configure script still can not find math.h and several libraries like:
@/lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find@
and this happens for several other libraries like:
-llog -lz -ldl -lstdc++ -lm -lc