Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Building static libs on macOS - post build link questions...



  • Client applications will clearly need to link to macOS native frameworks (since dynamic libs hide this from client applictions) - and outside of Qt I'm not much of a macOS guy.

    What are the system frameworks that generally need to be added to support QtCore and QtNetwork on macOS?

    I presume those would be combine in QMake via LIBS += -F <framework>?

    Thanks macOS guys/gals :)


  • Lifetime Qt Champion

    Hi,

    What is you exact use case ?

    Your Qt projects already links to everything needed.



  • Personally I just needed to link to CoreServices and SystemConfiguration.

    # Static builds require direct linking to macOS services
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreServices.framework/
    QMAKE_LFLAGS += -F /System/Library/Frameworks/SystemConfiguration.framework/
    
    LIBS += -framework CoreServices
    LIBS += -framework SystemConfiguration
    

    Cheers.


Log in to reply