[OS X] "unknown type name 'KARCHIVE_DEPRECATED'" building kdoctools

René J. V. Bertin rjvbertin at gmail.com
Wed Nov 4 21:45:18 UTC 2015


René J. V. Bertin wrote:

> Alex Merry wrote:
> 
>> Looks like your include path is wrong. /opt/local/include/KF5/KArchive
>> should be in the include path (before wherever wherever your kdelibs4
>> headers are).

In fact:

cd /opt/local/var/macports/build/_opt_local_site-ports_kf5_Frameworks/kf5-
kdoctools/work/build/src && 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++   
-DQT_CORE_LIB -DQT_MAC_USE_COCOA -DQT_NO_CAST_FROM_BYTEARRAY -
DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_SIGNALS_SLOTS_KEYWORDS -
DQT_NO_URL_CAST_FROM_STRING -DQT_QSP_XDG_LIB -DQT_USE_FAST_OPERATOR_PLUS -
DQT_USE_QSTRINGBUILDER -DTRANSLATION_DOMAIN=\"kdoctools5\" -D_DARWIN_C_SOURCE -
D_LARGEFILE64_SOURCE -O3 -march=native -g -DNDEBUG -stdlib=libc++  -std=c++0x -
fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -
Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -
Werror=return-type -pedantic -Wno-gnu-zero-variadic-macro-arguments -mmacosx-
version-min=10.9 -I/opt/local/var/macports/build/_opt_local_site-
ports_kf5_Frameworks/kf5-kdoctools/work/build/src -
I/opt/local/var/macports/build/_opt_local_site-ports_kf5_Frameworks/kf5-
kdoctools/work/kdoctools-5.15.0/src -I/opt/local/include/libxml2 -
I/opt/local/include -iframework /opt/local/libexec/qt5/Library/Frameworks -
isystem /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers -
isystem /opt/local/share/qt5/mkspecs/macx-clang -isystem 
/opt/local/libexec/qt5/Library/Frameworks/QtQspXDG.framework/Headers -isystem 
/opt/local/include/KF5/KArchive -isystem /opt/local/include/KF5    -fPIC -o 
CMakeFiles/meinproc5.dir/xslt_kde.cpp.o -c 
/opt/local/var/macports/build/_opt_local_site-ports_kf5_Frameworks/kf5-
kdoctools/work/kdoctools-5.15.0/src/xslt_kde.cpp

looking closely enough, you'll see that there's (in that order)

-I/opt/local/include -isystem /opt/local/include/KF5/KArchive

so it's perfectly correct that the KDE4 header is picked up first.

And the KARCHIVE_DEPRECATED error is explained the same way: the KDE4 
karchive_export.h header is found before the KF5 one ...

I must admit I don't really see the point in bundling headerfiles in a specific 
directory, only to relinquish the selectivity that allows from #include 
statements by adding the directory/ies to the -I includepath ...


R.



More information about the Kde-frameworks-devel mailing list