[Qt-interest] How do I use frameworks with qmake on the Mac?

Bob Hood bhood2 at comcast.net
Thu Jan 13 20:06:26 CET 2011


On 1/13/2011 11:15 AM, Nikos Chantziaras wrote:
> The qmake docs:
>
> http://doc.qt.nokia.com/4.7-snapshot/qmake-platform-notes.html#using-frameworks
>
> state that:
>
>    "qmake is able to automatically generate build rules for
>    linking against frameworks in the standard framework
>    directory on Mac OS X, located at /Library/Frameworks/"
>
> But unfortunately, it doesn't mention how.  Right now, I have to 
> manually add the header files directories with:
>
>    INCLUDEPATH += \
>      /Library/Frameworks/SDL.framework/Headers \
>      /Library/Frameworks/SDL_mixer.framework/Headers \
>      /Library/Frameworks/smpeg.framework/Headers \
>      /Library/Frameworks/SDL_sound.framework/Headers
>
> otherwise the application won't compile since #include can't find the 
> headers.  And then link with:
>
>    LIBS += -lSDL_mixer -lSDL_sound #etc, etc.

AFAIK, you'll have to added the header folder to INCLUDEPATH, yes.  For LIBS,
the only other format I know of is something like this:

     LIBS += -framework CoreServices -framework Carbon




More information about the Qt-interest-old mailing list