I am using KGameDifficulty in my program, but it is giving undefined reference problem. I have included the header kgamedifficulty.h.

undefined reference to `KGameDifficulty::init(KXmlGuiWindow*, QObject const*, char const*, char const*)'

Should I add something to CMakeLists.txt file?? If so, what should I write there?
Or, there are some other problems.

Please help.

Thank You