Building QtMqtt Library on Windows
-
Hello I have spent a few days trying to figure this out, and I am completely out of ideas, so any help would be really appreciated.
I am trying to build https://github.com/qt/qtmqtt. I have clones, checked out the branch 5.12.5 , which is the same Qt version I have installed , for android_armv7 , and I am facing the following error:
armeabi-v7a -LD:\AndroidSDK\ndk\19.2.5345600/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a C:/Qt/5.12.5/android_armv7/lib/libQt5Quick.so C:/Qt/5.12.5/android_armv7/lib/libQt5Gui.so C:/Qt/5.12.5/android_armv7/lib/libQt5Qml.so C:/Qt/5.12.5/android_armv7/lib/libQt5Network.so C:/Qt/5.12.5/android_armv7/lib/libQt5Core.so -lGLESv2 -LD:\AndroidSDK\ndk\19.2.5345600/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a D:\AndroidSDK\ndk\19.2.5345600/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.so.16 -llog -lz -lm -ldl -lc C:\Qt\5.12.5\android_armv7\bin\qmake.exe -install qinstall -exe libquickpublication.so C:\qtmqtt2\b_arm7\examples\mqtt\quickpublication\android-build\libs\armeabi-v7a\libquickpublication.so The filename, directory name, or volume label syntax is incorrect. make: *** [install_sources] Error 1 19:59:59: The process "D:\AndroidSDK\ndk\19.2.5345600\prebuilt\windows-x86_64\bin\make.exe" exited with code 2. Error while building/deploying project qtmqtt (kit: Android Qt 5.12.5 Clang armeabi-v7a) The kit Android Qt 5.12.5 Clang armeabi-v7a has configuration issues which might be the root cause for this problem. When executing step "Copy application data"
In Linux it compiles properly , but on Windows it doesn't. I need this on Windows. I cannot qmake, make , make install on Windows, or at least I do not know how to do it.
I have tried both running QtCreator as admin and normal. I cleaned , executed qmake, and build after each of these changes.Any idea what could be the issue?
Thanks!
-
Hi,
Since you are targeting Androïd, why not just copy the files generated for it from your Linux machine to your Windows machine ?
-
Thank you for your response. I tried adding all the .so files and all related files that were generated in Linux and installed to /opt/qt/ to C:\Qt\5.12.5\android_armv7 , like the .so related files and header files that I considered could be related, but when trying to include the MQTT module, the "MQTT module not found" error is still there. Do you know which files do I need to copy, so MQTT is found?
-
The libraries are only part of a module.
There are also .prf files if memory serves correctly plus the cmake files.
You can use a tool like rsync to copy only the files that do not exist at the target location.
-
Thanks, after tinkering a bit with this, I managed to make it compile. The issue that I currently have is the following when trying to deploy to my phone:
W m.kdab.trainin: Accessing hidden field Landroid/R$styleable;->LinearLayout_showDividers:I (greylist-max-q, reflection, allowed) W m.kdab.trainin: Accessing hidden field Landroid/R$styleable;->LinearLayout_dividerPadding:I (greylist-max-q, reflection, allowed) E linker : normalize_path - invalid input: "C", the input path should be absolute W linker : Warning: unable to normalize "C" (ignoring) E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread E AndroidRuntime: Process: com.kdab.training, PID: 22216 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libMetaAPP.so" not found: needed by /data/app/~~b0x5fiE63AEvEQPOlFVb7w==/com.kdab.training-yCog5aLD9yxblUvm0aTsFw==/lib/arm/libGuiApp.so in namespace classloader-namespace E AndroidRuntime: at java.lang.Runtime.load0(Runtime.java:939) E AndroidRuntime: at java.lang.System.load(System.java:1628) E AndroidRuntime: at org.qtproject.qt5.android.QtNative$4.run(QtNative.java:259) E AndroidRuntime: at org.qtproject.qt5.android.QtThread$2.run(QtThread.java:87) E AndroidRuntime: at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61) E AndroidRuntime: at java.lang.Thread.run(Thread.java:923) 22:38:23: ``` So apparently libMetaAPP.so cannot be found, this is an internal library, as my project has various .pro files. Do you know why could be the reason that this fails during the deploy? Thanks again
-
If you have external libraries you have to add them to the deployment.