Hi Christian! Why not try this: SET(cqtlib_MOC_HDRS Test.h ) QT4_WRAP_CPP(cqtlib_MOC_SRC ${cqtlib_MOC_HDRS}) SET(cqtlib_SRCS ${cqtlib_MOC_SRC} Test.cpp ) ADD_EXECUTABLE(Segmentation ${cqtlib_SRCS}) Note that in this case, Test.cpp should NOT #include the source file created by moc, but the original header (Test.h). Good luck! Best regards, Gerhard