Originally Posted by
Uwe
Please look into the implementation of qtAddLibrary ( in qt_functions.prf ) and check why it doesn't work in your environment.
I did not completely understand every detail that happens in the qtAddLibrary function, but I think I found out what causes the problem:
INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1
INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH
LIB_NAME = $$1
unset(LINKAGE)
mac {
CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced
QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT}
FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX}
} else:!qt_no_framework { #detection
for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/F$
exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LINKAGE = -framework $${LIB_NAME}
break()
}
}
}
}
INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1
INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH
LIB_NAME = $$1
unset(LINKAGE)
mac {
CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced
QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT}
FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX}
} else:!qt_no_framework { #detection
for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/F$
exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LINKAGE = -framework $${LIB_NAME}
break()
}
}
}
}
To copy to clipboard, switch view to plain text mode
The variable $$1 gets the value "qwt" and this is written into the variable LIB_NAME.
In every outcome for "mac" the LINKAGE option "-framework qwt" is thereofore added as compiler option. This causes the linker to look for the folder "qwt.framework" in the $$QMAKE_LIBDIR_QT and this is simply not present. Therefore the linking stops with the corresponding error.
But unfortunately I see no way in specifying a "custom" place (namely ../lib) to look for the framework. It seems to be the intention of this function to look in the system framework directory for the specified framework. All options that are set using the "LIBS" variable are not considered for the addition of the "-framework" flag.
But (as I already said) my experince is negligible and therefore my "analysis" of the error might be totally wrong.
Bookmarks