Always be sure that you have the newest version of the KDE libraries installed. The software is in constant development, so the dependencies can change from one day to another. You may also find the general compilation hints helpful. Another problem could be that you are using a program written for a very old version of KDE, which depends on outdated include files. Please check the file dates. They should be more recent the dates of your current KDE version.