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. Qt Static Compile - MacOS Deployment Target
QtWS25 Last Chance

Qt Static Compile - MacOS Deployment Target

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.5k 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.
  • S Offline
    S Offline
    ScottLupton
    wrote on last edited by
    #1

    I'm trying to do a static build of Qt for a target of MacOS 10.7+. I built Qt like this:

    export MACOSX_DEPLOYMENT_TARGET=10.7
    ./configure -platform macx-clang -static -opensource -confirm-license -make libs
    make
    make install
    

    In my project .pro file I have:

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
    

    When I compile my project I get over 1000 warnings along the lines of this, where xxxxx are Qt object files:

    warning: object file (xxxxx) was built for newer OSX version (10.10) than being linked (10.7)
    

    It therefore seems that my project is being built for MacOS 10.7, but Qt has been compiled for 10.10. It looks like the MACOSX_DEPLOYMENT_TARGET environment variable is ignored when compiling Qt and I can't find a configure parameter for specifying the MacOS target version.

    How do I specify the MacOS deployment target when compiling Qt?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You have to modify the mkspec for that. Also be aware that Qt is officially supporting the last three versions of macOS so currently 10.10 is the oldest. It doesn't mean that it won't run on older version but it's not something that you should rely on.

      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
      1
      • S Offline
        S Offline
        ScottLupton
        wrote on last edited by
        #3

        Thanks for the information. I wasn't aware that Qt only supported the last three versions of MacOS.

        It's probably best to stick with the officially supported versions so I'll change my target to 10.10.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can find the list here.

          As I wrote before, your application might run on older version of macOS, but you'll have to try first.

          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
          1

          • Login

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