Are you sure it's "headers"? Or is it "Headers"? Your file system is case sensitive, right?
It is "Headers", but it does not make any difference as we can not write it in include path. All header files are automatically included by DiscRecording.h file and the framework have multiple sub frameworks having multiple Headers folders.
Unfortunately I don't have a Mac.
Well, presumably something goes wrong if the type is declared in that header but it's still unknown after trying to include the header file.
Does this work?
LIB_NAME = DiscRecording
FRAMEWORK_PATH = /System/Library/Frameworks
FRAMEWORK_INCLUDE = $${FRAMEWORK_PATH}/$${LIB_NAME}.framework/headers # Headers or headers??
exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LIBS += -framework $${LIB_NAME}
LIB_NAME = DiscRecording
FRAMEWORK_PATH = /System/Library/Frameworks
FRAMEWORK_INCLUDE = $${FRAMEWORK_PATH}/$${LIB_NAME}.framework/headers # Headers or headers??
exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LIBS += -framework $${LIB_NAME}
To copy to clipboard, switch view to plain text mode
Above solution can not work for the reason that framework has multiple sub frameworks with multiple Headers folders.
Presumably you should try with include "DiscRecording.h" since you say the file is in "/System/Library/Frameworks/DiscRecording.framework/headers/DiscRecording.h". However, it would be include "DiscRecording/DiscRecording.h" if it was in "/System/Library/Frameworks/DiscRecording.framework/headers/DiscRecording/DiscRecording.h".
Bookmarks