Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Building QtMqtt Library on Windows
Forum Updated to NodeBB v4.3 + New Features

Building QtMqtt Library on Windows

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 503 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    albertabac
    wrote on 3 Nov 2021, 19:05 last edited by
    #1

    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!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 3 Nov 2021, 19:07 last edited by
      #2

      Hi,

      Since you are targeting Androïd, why not just copy the files generated for it from your Linux machine to your Windows machine ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • A Offline
        A Offline
        albertabac
        wrote on 3 Nov 2021, 19:35 last edited by albertabac 11 Mar 2021, 19:36
        #3

        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?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 3 Nov 2021, 19:44 last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            albertabac
            wrote on 3 Nov 2021, 21:42 last edited by albertabac 11 Mar 2021, 21:43
            #5

            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
            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 4 Nov 2021, 20:02 last edited by
              #6

              If you have external libraries you have to add them to the deployment.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              3 Nov 2021, 19:05

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved