Headers in third-party frameworks on Mac OS X

I use the Sparkle framework in Qt. I added the following to my .pro file:

LIBS += -framework Sparkle
QMAKE_CXX_FLAGS += -F/path/to/the/directory/sparkle.framework/is/in

However, I get a compilation error saying that "Sparkle / Sparkle.h" could not be found. Image headers are physically located in MyFramework.framework / Headers / *. H and included as MyFramework / *. H

What commands do I need to add to my .pro file to correctly include the Sparkle frame headers?

+3
source share
2 answers

The problem was what I used QMAKE_CXXFLAGS, I needed to use the QMAKE_CFLAGScompiler to include the headers.

+2
source

INCLUDEPATH .pro.

#include, . ';' .

, :

INCLUDEPATH = MyFramework.framework/Headers

MyFramework.framework/Headers - .

MAC OS, , .

Edit

FrameWorkName/HeaderFile.h, .

,

home/CommonFolder/FrameWorkName/HeaderFile.h - , INCLUDEPATH

INCLUDEPATH = home/CommonFolder

.cpp #include "FrameWorkName/HeaderFile.h",

0

Source: https://habr.com/ru/post/1759075/


All Articles