Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-139942

[iOS] Unable to create shared dylib/framework that depends on Qt GUI

XMLWordPrintable

    • iOS/tvOS/watchOS

      Code
      CMakeLists.txt

      cmake_minimum_required(VERSION 3.19)
      project(MyLib LANGUAGES CXX)
      
      set(TEST_MODULE Gui) # <-- "Core" links fine; "Gui" fails to link
      
      find_package(Qt6 REQUIRED COMPONENTS ${TEST_MODULE})
      
      add_library(MyLib
          SHARED # <-- "STATIC" links fine; "SHARED" fails to link
              foo.cpp
      )
      target_link_libraries(MyLib PRIVATE
          Qt::${TEST_MODULE}
      )
      

       

      foo.cpp

      void foo() {}
      

       

      Outcomes

      Undefined symbols for architecture arm64:
        "_main", referenced from:
            user_main_trampoline() in libqios_debug.a[arm64][6](qioseventdispatcher.mm.o)
      ld: symbol(s) not found for architecture arm64
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtbuildsystem Qt Build System Team
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change