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. Qt Quick app (or other) deploy on iOS device or emulator
Forum Updated to NodeBB v4.3 + New Features

Qt Quick app (or other) deploy on iOS device or emulator

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 581 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.
  • R Offline
    R Offline
    range36rus
    wrote on 25 Feb 2021, 20:35 last edited by
    #1

    I has Mac OS big sur 11.1, Xcode 12.3(12c33), qt 5.14.2 + qt creator 4.11.1 ( installed with online installer). I made simple project qt quick, build for macos working well, but when i try to build it for iOS emulator, I getting this error:

    17:06:29: Running steps for project untitled...
        17:06:29: Starting: "/Users/range/Qt5.14.2/5.14.2/ios/bin/qmake" /Users/range/untitled/untitled.pro -spec macx-ios-clang CONFIG+=iphonesimulator CONFIG+=simulator CONFIG+=qml_debug -after
        Project ERROR: Cannot run target compiler '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'. Output:
        ===================
        Apple clang version 12.0.0 (clang-1200.0.32.28)
        Target: x86_64-apple-darwin20.2.0
        Thread model: posix
        InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
        ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/c++/v1"
         "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-ios14.3.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=all -fno-strict-return -masm-verbose -munwind-tables -target-sdk-version=14.3 -target-cpu core2 -dwarf-column-info -debugger-tuning=lldb -target-linker-version 609.8 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk -stdlib=libc++ -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -fdeprecated-macro -fdebug-compilation-dir /Users/range/Qt5.14.2/5.14.2/ios/mkspecs/features -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-runtime=ios-14.3.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o /var/folders/j0/wkdnpcrd32x6lfr0z6rz29c40000gn/T/--aab3ee.o -x c++ -
        clang -cc1 version 12.0.0 (clang-1200.0.32.28) default target x86_64-apple-darwin20.2.0
        ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/local/include"
        ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/Library/Frameworks"
        #include "..." search starts here:
        #include <...> search starts here:
         /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
         /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include
         /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include
         /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
         /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks (framework directory)
        End of search list.
         "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.x
        ctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -dylib -arch x86_64 -platform_version ios 14.3.0 14.3 -single_module -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk -o /dev/null -v /var/folders/j0/wkdnpcrd32x6lfr0z6rz29c40000gn/T/--aab3ee.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.ios.a
        @(#)PROGRAM:ld  PROJECT:ld64-609.8
        BUILD 20:09:52 Nov  4 2020
        configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
        Library search paths:
         /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/lib
        Framework search paths:
         /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/
        ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/lib/libc++.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/lib/libc++.tbd (4 slices)
        ld: building for iOS, but linking in object file built for iOS Simulator, file '/var/folders/j0/wkdnpcrd32x6lfr0z6rz29c40000gn/T/--aab3ee.o' for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        ===================
        Maybe you forgot to setup the environment?
        17:06:30: The process "/Users/range/Qt5.14.2/5.14.2/ios/bin/qmake" exited with code 3.
        Error while building/deploying project untitled (kit: Эмулятор Qt 5.14.2 for iOS)
        When executing step "qmake"
        17:06:30: Elapsed time: 00:01.
    

    enter image description here

    Accordingly I can’t generate project for xcode and build app for real device, since the same error occurs.

    My sets:
    enter image description here

    enter image description here
    Profiles:
    enter image description here
    Compilers:
    enter image description here

    What can be wrong?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      range36rus
      wrote on 26 Feb 2021, 15:40 last edited by
      #4

      I found a solution. You need to find all files called as "toolchain.prf" in qt instalation directory and change this code:

      defineTest(qtCompilerError) {
      !cross_compile: \
      what =
      else: host_build: \
      what = " host"
      else: \
      what = " target"
      qtToolchainError("Cannot run$$what compiler '$$1'. Output:", $$2, \
      "Maybe you forgot to setup the environment?")
      }
      

      to this code:

      defineTest(qtCompilerError) {
      # empty
      }
      

      After this everything works fine on ios and ios-emulator.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 26 Feb 2021, 06:09 last edited by
        #2

        I believe, you have to launch Xcode and launch a simulator, that should install/download aniPhoneSimulator Sdk at that path location


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          range36rus
          wrote on 26 Feb 2021, 08:15 last edited by range36rus
          #3

          @J-Hilk I launched emulator. What i have to do next?
          Emulator existing on this path:
          Снимок экрана 2021-02-26 в 11.31.55.png

          1 Reply Last reply
          0
          • R Offline
            R Offline
            range36rus
            wrote on 26 Feb 2021, 15:40 last edited by
            #4

            I found a solution. You need to find all files called as "toolchain.prf" in qt instalation directory and change this code:

            defineTest(qtCompilerError) {
            !cross_compile: \
            what =
            else: host_build: \
            what = " host"
            else: \
            what = " target"
            qtToolchainError("Cannot run$$what compiler '$$1'. Output:", $$2, \
            "Maybe you forgot to setup the environment?")
            }
            

            to this code:

            defineTest(qtCompilerError) {
            # empty
            }
            

            After this everything works fine on ios and ios-emulator.

            1 Reply Last reply
            0

            1/4

            25 Feb 2021, 20:35

            • Login

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