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. Do Qt 5.12 supports Shared libraries for ios platform?
Forum Update on Monday, May 27th 2025

Do Qt 5.12 supports Shared libraries for ios platform?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 3 Posters 1.7k Views
  • 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.
  • T Offline
    T Offline
    tarakm87
    wrote on last edited by tarakm87
    #1

    Hi,

    We are trying to port a Qt5 based application to Qt IOS platform. Our application has multiple plugins based of QtPlugin. We use Qt Plugin loader to load them. As Qt Plugin Loader requires plugins to be a dynamically linked libraries, we tried to build qt 5.12 with -shared flag. When we compile the analog clock example shipped with Qt 5.12. It failed with following error.

    Undefined symbols for architecture arm64:
      "lcEventDispatcher()", referenced from:
          _qt_main_wrapper in libqios.a(qioseventdispatcher.o)
          +[QIOSApplicationStateTracker applicationDidFinishLaunching:] in libqios.a(qioseventdispatcher.o)
          user_main_trampoline() in libqios.a(qioseventdispatcher.o)
          +[QIOSApplicationStateTracker applicationWillTerminate] in libqios.a(qioseventdispatcher.o)
          QIOSJumpingEventDispatcher::interruptEventLoopExec() in libqios.a(qioseventdispatcher.o)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I would like to know if Qt 5.12 supports shared libraries for iOS platform? If supported what needs to be changed in the example to get compiled correctly. If shared libraries are not supported yet, what approach should i use to port my application with current structure over ios platform.

    Thanks in advance for your time and your valuable advices.

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

      Hi and welcome to devnet,

      It does but you have to build Qt yourself for that. Also note that you will likely have to build the APK yourself currently to add all the dependencies.

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

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        It does but you have to build Qt yourself for that. Also note that you will likely have to build the APK yourself currently to add all the dependencies.

        T Offline
        T Offline
        tarakm87
        wrote on last edited by tarakm87
        #3

        @SGaist I have built QT by myself, by passing -shared in the configure. But when i compile the example or my application, we get error as mentioned in my post. Do we have to do anything to remove that error?

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

          Can you show the options you passed to configure when building Qt ?

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

          T 1 Reply Last reply
          0
          • SGaistS SGaist

            Can you show the options you passed to configure when building Qt ?

            T Offline
            T Offline
            tarakm87
            wrote on last edited by
            #5

            @SGaist OffCourse it is like below,

            ./configure -xplatform macx-ios-clang -release -shared -prefix /home/testuser/qt

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

              Note that you can use static plugins within your application. It requires some changes but it might be easier than currently handling a shared build of Qt on iOS.

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

              T 1 Reply Last reply
              1
              • SGaistS SGaist

                Note that you can use static plugins within your application. It requires some changes but it might be easier than currently handling a shared build of Qt on iOS.

                T Offline
                T Offline
                tarakm87
                wrote on last edited by
                #7

                @SGaist Is their any example of dynamically linked ios application which i can refer or it is not fully supported yet?

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

                  I'm currently not aware of such a project (but that doesn't mean it doesn't exist) sorry.

                  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
                  • F Offline
                    F Offline
                    Fischerauer
                    wrote on last edited by
                    #9

                    @tarakm87 Have a look at the bug report QTBUG-75457. There you can find a patch that solves the issue with the undefined lcEventDispatcher. Consider to clean all build files before applying the patch.

                    1 Reply Last reply
                    2

                    • Login

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