Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
Error building freetype2 for Android with Qt Creator
Tom_H last edited by Tom_H
Hello. I'm trying to build freetype-2.7 for Android with Qt Creator but it's not working. I open the project as a CMake project. I can build it for win32-desktop but not for Android. It's failing at the cmake configure phase. I know my android kit is working because I can build and deploy a simple Qt project. I've seen some articles on how to build it using make-standalone-toolchain.sh from the Android SDK, but I'd like to do everything from Qt Creator.
The first error shows up in the General Messages window:
CMake Error at C:/Programs/cmake-3.6.3-win64-x64/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/.../Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-gcc.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/tom/tmp/freetype-2.7/_build_android/CMakeFiles/CMakeTmp
Then, in the CMakeError.log file:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: C:/.../Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64/bin/i686-linux-android-gcc.exe Build flags: Id flags: The output was: 1 .../i686-linux-android/bin/ld.exe: error: cannot open crtbegin_dynamic.o: No such file or directory .../i686-linux-android/bin/ld.exe: error: cannot open crtend_android.o: No such file or directory .../i686-linux-android/bin/ld.exe: error: cannot find -lc .../i686-linux-android/bin/ld.exe: error: cannot find -ldl collect2.exe: error: ld returned 1 exit status
The linker can't find some files even though they exist. Is there a way to tell cmake the library search path? (I'm a cmake noob)
Qt version: Qt 5.7.0 MinGW 32bit
Qt Creator version: 4.1.0
Android kit: Android for x86 (GCC 4.9, Qt 5.7.0)
OS: Windows 8.1
Any ideas? Thanks.
Tom_H last edited by
Update: This is definitely not a problem with Qt or Qt Creator. I tried building it with Android Studio and got the same problem when I used gcc, and a different problem when I used clang (no errors, but no output). I was able to build it from the command line using the make_standalone_toolchain.py utility from the Android SDK and CMake.