Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Qt Creator 4.11.0-beta1
-
None
Description
Compiling a simple example fails because the ndk sysroots is not added.
Running with Qt Creator 4.10 / Qt 5.13:
/home/raphael/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -gcc-toolchain /home/raphael/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=/home/raphael/android-ndk-r19c/sysroot -isystem /home/raphael/android-ndk-r19c/sysroot/usr/include/arm-linux-androideabi -isystem /home/raphael/android-ndk-r19c/sources/cxx-stl/llvm-libc++/include -isystem /home/raphael/android-ndk-r19c/sources/android/support/include -isystem /home/raphael/android-ndk-r19c/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I../qt_test -I. -I../../../Qt/5.13.0/android_armv7/include -I../../../Qt/5.13.0/android_armv7/include/QtCore -I. -I../../../Qt/5.13.0/android_armv7/mkspecs/android-clang -o main.o ../qt_test/main.cpp /home/raphael/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -gcc-toolchain /home/raphael/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -Wl,--exclude-libs,libunwind.a --sysroot=/home/raphael/android-ndk-r19c/platforms/android-21/arch-arm/ -Wl,-soname,libqt_test.so -Wl,-rpath=/home/raphael/Qt/5.13.0/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libqt_test.so main.o /home/raphael/Qt/5.13.0/android_armv7/lib/libQt5Core.so -L/opt/android/android-ndk-r19c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -L/home/raphael/android-ndk-r19c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a /home/raphael/android-ndk-r19c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.so.21 -llog -lz -lm -ldl -lc
Whereas running it with Qt Creator 4.11.0-beta1 / Qt 5.14:
/home/raphael/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target armv7a-linux-androideabi21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I../qt_test -I. -I../../../Qt/5.14.0/android/include -I../../../Qt/5.14.0/android/include/QtCore -Iarmeabi-v7a -I../../../Qt/5.14.0/android/mkspecs/android-clang -o armeabi-v7a/main.o ../qt_test/main.cpp
Source code: main.cpp
#include <QCoreApplication> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); }
qmake file:
QT -= gui CONFIG += c++11 console CONFIG -= app_bundle # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp TRANSLATIONS += \ qt_test_fr_FR.ts # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target