Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linking mac framework to qt creator

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?

like image 450
Martins Avatar asked Aug 18 '10 15:08

Martins


People also ask

Does Qt support Mac?

Qt for macOS is tested and compatible with several versions of GCC (GNU Compiler Collection) and Clang (as available from Xcode).

What is qt5 Mac?

Qt Tool Kit 5. Qt Tool Kit: A cross-platform framework (headers, data, and libraries) for writing cross-platform GUI-based applications. Qt Tool Kit: A cross-platform framework (headers, data, and libraries) for writing cross-platform GUI-based applications.

Where does Qt install Mac?

To configure the Qt library for your machine type, run the ./configure script in the package directory. By default, Qt is configured for installation in the /usr/local/Trolltech/Qt-4.8.


1 Answers

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
like image 195
Troubadour Avatar answered Sep 29 '22 11:09

Troubadour