PDA

View Full Version : moc file generation problem in Microsoft Visual Studio with Qt 4.6.0



hkaraoguz84
20th September 2010, 15:06
Hello,

My question is, in a Visual Studio project, when files(.h and .cpp) of a Q_OBJECT class are in the project directory, the moc file for that class is generated successfuly.

However, when I create a folder for that class inside the project directory and put the .h and .cpp files there, the moc file is not created and as a result linking errors occur.

Is there a way to solve this problem?
Thanks...

P.S: I use Microsoft Visual Studio 2005 with Qt 4.6.0 and Qt Visual Studio Addin 1.1.4

tbscope
20th September 2010, 17:49
Clean the project and rerun qmake before building the source again.
Does this help?