Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiling for macOS - what compilers are supported please?
Forum Updated to NodeBB v4.3 + New Features

Compiling for macOS - what compilers are supported please?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 454 Views 4 Watching
  • 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.
  • P Offline
    P Offline
    Perdrix
    wrote on 19 Nov 2024, 14:59 last edited by Perdrix
    #1

    Does Qt require the use of XCode's C/C++ compiler? Can either of llvm or g++ be used instead?

    What other options are there?
    Thanks
    David

    P J 2 Replies Last reply 19 Nov 2024, 15:22
    0
    • P Perdrix
      19 Nov 2024, 14:59

      Does Qt require the use of XCode's C/C++ compiler? Can either of llvm or g++ be used instead?

      What other options are there?
      Thanks
      David

      P Offline
      P Offline
      Pl45m4
      wrote on 19 Nov 2024, 15:22 last edited by
      #2

      @Perdrix

      Compile Qt itself or compile Qt apps on macOS?

      Here it says:

      The build environment on macOS is defined entirely by the Xcode version used to build your application. Xcode contains both a toolchain (compiler, linker, and other tools), and a macOS platform-SDK (headers and libraries). Together these define how your application is built.

      Note: The version of macOS that you are running Xcode on does not matter. As long as Apple ships a given Xcode version that runs on your operating system, the build environment will be defined by that Xcode version.
      https://doc.qt.io/qt-6/macos.html

      • https://doc.qt.io/qt-6/macos.html#build-environment
      • https://doc.qt.io/qt-6/macos-building.html

      Compiling with QtCreator on Mac:

      • https://doc.qt.io/qtcreator/creator-tool-chains.html

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • P Perdrix
        19 Nov 2024, 14:59

        Does Qt require the use of XCode's C/C++ compiler? Can either of llvm or g++ be used instead?

        What other options are there?
        Thanks
        David

        J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 19 Nov 2024, 15:23 last edited by
        #3

        @Perdrix the QtFramework does not require any particular compiler. It does require c++17 features (IIRC).

        IF you're willing to compile it yourself you can use any c++ compiler you want. If you want to use the precompiled libs than yes, apple clang and therefore Xcode, or at least the command line tools, are a must.

        Don't worry, no-one really likes Xcode.


        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
        1
        • P Offline
          P Offline
          Perdrix
          wrote on 19 Nov 2024, 17:32 last edited by Perdrix
          #4

          My apologies - that should be clearer - if I've DL'ed the pre-built version of Qt 6.8.0, do I have to use XCode's supplied compiler to build my code or can I use other compilers.

          Why? I need to use SIMD which the clang compiler shipped with XCode doesn't (AFAIK) support.

          Thanks
          David

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 19 Nov 2024, 20:31 last edited by
            #5

            Hi,

            Non Apple clang is officially unsupported territory. It's also untested.
            Xcode is the IDE/Suite of tools but the compiler is clang for quite some time now.

            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
            3

            1/5

            19 Nov 2024, 14:59

            • Login

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