"kcolorscheme.h" contains #include <ksharedconfig.h>. If kdelibs are installed in location such as /usr, and /usr/include is likely to be in include directories list for any application, and somewhere near the beginning of this list. In this case kcolorscheme.h from KF5 includes ksharedconfig.h from kdelibs and compilation/linking fails. Replacing #include <ksharedconfig.h> with #include <KSharedConfig> fixes problem here. However, ksharedconfig.h from KF5 has the similar problem: #include <kconfig.h>. This can be replaced with #include "kconfig.h"
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.
Closing as fixed (since there is no resolved:old state).