PDA

View Full Version : Android Clang COmpile Error



yagabey
5th July 2019, 17:15
Hi All,

I am having some problems when compiling Android projects with some resource files added.

I have tested with all Qt 511, 5.12 and 5.13 with Android SDK Version: 26.1.1, NDK Version: 19.2.5345600.

I have created a very simple project. And added a resource file with some data. In this case the compiler gives following error:


qmlcache_loader.obj:qmlcache_loader.cpp:function QGlobalStatic<(anonymous namespace)::Registry, (anonymous namespace)::(anonymous namespace)::Q_QGS_unitRegistry::innerFunction(), (anonymous namespace)::(anonymous namespace)::Q_QGS_unitRegistry::guard>::operator()(): error: undefined reference to 'QQmlPrivate::qmlregister(QQmlPrivate::Registratio nType, void*)'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libAndroidResourceTest.so] Error 1
17:06:32: The process "E:\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
Error while building/deploying project AndroidResourceTest (kit: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7))


When I exclude the resource file, it compiles successfully. You could find the project on the attachment.

What could be the reason?

What is the most stable SDK and NDK version for QT at the moment?


Thanks, regards