Qt Static Compile - MacOS Deployment Target



  • 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?


  • Lifetime Qt Champion

    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.



  • 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.


  • Lifetime Qt Champion

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.