linking mac framework to qt creator

15,887

I assume the project itself is using Qt i.e. it is using .pro files to configure things like include paths and library/framework paths? If so then you just need to update the relevant .pro file to add the framework.

See the qmake docs for more detail. The gist of it is to add

QMAKE_LFLAGS += -F/path/to/framework/directory/

and

LIBS += -framework TheFramework
Share:
15,887
Martins
Author by

Martins

Updated on June 15, 2022

Comments

  • Martins
    Martins almost 2 years

    I have a project that uses SystemConfiguration.Framework.

    I've been using xcode, where adding the framework is quite easy, just add it to xcode project's framework. But now, I need my project to be cross platform, so I'm using QT Creator as a single IDE, for Windows and Mac. The problem is that I don't know how to tell QT Creator how to link to the systemConfiguration.framework. The header from the framework are correctly included, no problem there... just when is ending the compilation it complains that some symbols where not found, i.e, the symbols that are exported from the systemconfiguration.framework...

    Does anyone knows or can help me to set up the Qt creator project to link agains that framework, please?

  • Martins
    Martins over 13 years
    Thanks, Troubadour... somehow I missed that section when looking at the qmake documentation... now with the LIBS flag, I have the project compiling. Thanks
  • Troubadour
    Troubadour over 13 years
    @Martins: No problem. Glad to help.
  • BuvinJ
    BuvinJ over 8 years
    This was working for me until Qt 5.5. Now it seems broken. Anyone know how to fix it?
  • BuvinJ
    BuvinJ over 7 years
    I haven't looked at this in a while now. As I recall, I was forced to keep using older versions of Qt and XCode for a collection of reasons the newer versions of each introduced and I didn't have the time yet to resolve. Please post a solution if you find one.