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. IOS: building for 'iOS-simulator', but linking in object file for iOS

IOS: building for 'iOS-simulator', but linking in object file for iOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
ios simulatorqtcreator 11cmakec++
2 Posts 2 Posters 1.2k 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
    TheoSys
    wrote on 10 Oct 2023, 13:46 last edited by TheoSys 10 Oct 2023, 13:49
    #1

    I try to compile my mobile app for iOS simulator but the linker fails with the message:

    ld: building for 'iOS-simulator', but linking in object file (/opt/Qt/6.6.0/ios/plugins/imageformats/objects-Release/QGifPlugin_init/QGifPlugin_init.cpp.o) built for 'iOS'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    This same error happen also when I try for debug (above is for release) and with the older version 6.5.x. Didn't try with older Qt versions.

    Compiling for a real device works.
    I'm using Qt Creator 11.0.3 with cmake on a Mac Mini with Apple silicon. It looks like the object files for the iOS simulator are missing.

    Is there a way to compile for iOS simulator?

    A.T.

    K 1 Reply Last reply 24 Dec 2023, 19:39
    0
    • T TheoSys
      10 Oct 2023, 13:46

      I try to compile my mobile app for iOS simulator but the linker fails with the message:

      ld: building for 'iOS-simulator', but linking in object file (/opt/Qt/6.6.0/ios/plugins/imageformats/objects-Release/QGifPlugin_init/QGifPlugin_init.cpp.o) built for 'iOS'
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      This same error happen also when I try for debug (above is for release) and with the older version 6.5.x. Didn't try with older Qt versions.

      Compiling for a real device works.
      I'm using Qt Creator 11.0.3 with cmake on a Mac Mini with Apple silicon. It looks like the object files for the iOS simulator are missing.

      Is there a way to compile for iOS simulator?

      A.T.

      K Offline
      K Offline
      Kentzo
      wrote on 24 Dec 2023, 19:39 last edited by
      #2

      You have to re-compile Qt specifically for the simulator via -DQT_UIKIT_SDK=iphonesimulator. Possibly forcing different architecture via -DCMAKE_OSX_ARCHITECTURES=arm64.

      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