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. Does the mobile terminal not support static compilation of Qt libraries?
Forum Updated to NodeBB v4.3 + New Features

Does the mobile terminal not support static compilation of Qt libraries?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 94 Views 2 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
    ax168
    wrote last edited by
    #1
    ../configure -xplatform android-clang -static -android-abis x86_64 -release -opensource -confirm-license -qt-host-path ... -android-sdk ... -android-ndk ...
    

    Use this configuration to successfully compile the QT android static library, and use this version library to create a project in Qt Creator Tips

    ...\lib\cmake\Qt6Core\Qt6CoreMacros.cmake:792:EVAL:1: error: Detected Qt installation does not contain qtforandroid_x86_64.so in the
    following dir:

    .../plugins/platforms

    This is most likely due to the installation not being a Qt for Android
    build. Please recheck your build configuration.

    Call stack:
    .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1 (qt6_finalize_target)
    .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
    .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
    .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (_qt_internal_android_executable_finalizer)
    .../lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:1565 (qt6_android_generate_deployment_settings)
    .../lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:125 (message)

    Copy an existing dynamic version of libplugins_platforms_qtforandroid_x86_64.so to the plugins\platforms directory and prompt when building

    :-1: error: ld.lld: error: duplicate symbol: JNI_OnLoad
    qjnihelpers.cpp:-1: defined at qjnihelpers.cpp
    JNI_OnLoad) in archive D:-1: qjnihelpers.cpp.o:(JNI_OnLoad) in archive ... /lib/libQt6Core_x86_64.a
    androidjnimain.cpp:-1: defined at androidjnimain.cpp
    .text.JNI_OnLoad+0x0) in archive D:-1: androidjnimain.cpp.o:(.text.JNI_OnLoad+0x0) in archive ... /plugins/platforms/libqtforandroid_x86_64.a
    :-1: error: linker command failed with exit code 1 (use -v to see invocation)
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

    Is it true that in terms of code implementation, only dynamic libraries can be loaded dynamically?

    Axel SpoerlA 1 Reply Last reply
    0
    • A ax168
      ../configure -xplatform android-clang -static -android-abis x86_64 -release -opensource -confirm-license -qt-host-path ... -android-sdk ... -android-ndk ...
      

      Use this configuration to successfully compile the QT android static library, and use this version library to create a project in Qt Creator Tips

      ...\lib\cmake\Qt6Core\Qt6CoreMacros.cmake:792:EVAL:1: error: Detected Qt installation does not contain qtforandroid_x86_64.so in the
      following dir:

      .../plugins/platforms

      This is most likely due to the installation not being a Qt for Android
      build. Please recheck your build configuration.

      Call stack:
      .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1 (qt6_finalize_target)
      .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
      .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
      .../lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (_qt_internal_android_executable_finalizer)
      .../lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:1565 (qt6_android_generate_deployment_settings)
      .../lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:125 (message)

      Copy an existing dynamic version of libplugins_platforms_qtforandroid_x86_64.so to the plugins\platforms directory and prompt when building

      :-1: error: ld.lld: error: duplicate symbol: JNI_OnLoad
      qjnihelpers.cpp:-1: defined at qjnihelpers.cpp
      JNI_OnLoad) in archive D:-1: qjnihelpers.cpp.o:(JNI_OnLoad) in archive ... /lib/libQt6Core_x86_64.a
      androidjnimain.cpp:-1: defined at androidjnimain.cpp
      .text.JNI_OnLoad+0x0) in archive D:-1: androidjnimain.cpp.o:(.text.JNI_OnLoad+0x0) in archive ... /plugins/platforms/libqtforandroid_x86_64.a
      :-1: error: linker command failed with exit code 1 (use -v to see invocation)
      clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      ninja: build stopped: subcommand failed.

      Is it true that in terms of code implementation, only dynamic libraries can be loaded dynamically?

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote last edited by
      #2

      Hi and welcome to the Qt Forum!

      I don't understand exactly what the question is.

      Is it true that in terms of code implementation, only dynamic libraries can be loaded dynamically?

      If this is the question, the answer is YES.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote last edited by
        #3

        Hi,

        Static builds require extra steps with regards to plugins.
        See the static plugins howto.

        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

        • Login

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