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

Qt Shared Library project on iOS fails to build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.11
    • Build System
    • None
    • MacOS 12, XCode 14.01 running on x86 Mac mini
    • iOS/tvOS/watchOS

    Description

      Created a Qt Library (shared) project for iOS in Qt Creator. It has to be shared library (dylib) so that I can load dynamically in a Xamarin app. The problem is if I include gui module in the project (have to use QImage), then the project fails to compile with error below. However, if I remove gui module (and references to QImage) or make it a static library, then the project builds fine.

      Since I need QImage support (don't need to display any UI etc) and the output library needs to be dynamic so that it can be loaded by Xamarin. How can this issue by resolved?

      Undefined symbols for architecture arm64:
        "_main", referenced from:
            user_main_trampoline() in libqios.a(qioseventdispatcher.o)
           (maybe you meant: _qt_main_wrapper, _jinit_d_main_controller , _jinit_c_main_controller )
      ld: symbol(s) not found for architecture arm64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make: *** [libQtLibrary.1.0.0.dylib] Error 1
      03:16:28: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project QtLibrary (kit: Qt 5.15.11 for iOS)
      The kit Qt 5.15.11 for iOS has configuration issues which might be the root cause for this problem.
      When executing step "Make"
      

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              taytoo Mike Flanigan
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes