MOC problem
-
Hi, I'm working on a project with Visual Studio 2005 (Win XP SP3 32bit, Qt 4.6.2, Qt Add-in 1.1.5) and I need to add a new QObject class. I'm not sure the problem is directly connected to Qt, but when I try to build the class , VS2005 return me this error:
bq. 1>moc_classTest.cpp
1>c1xx : fatal error C1083: Cannot open source file: '.\generatedfiles\debug\moc_classTest.cpp': No such file or directory
1>moc_classTest.cppIn other words it seems that VS2005 can't create the relative moc (it's not a file system's right problem). Here's class code:
@#include <QObject>
class classTest: public QObject
{
Q_OBJECT
public:
classTest();
};@If I remove Q_OBJECT macro, the compilation will complete successfully, but I need to use signal and slot.... :(
Does anyone have a suggestions? -
Seems "this":http://bugreports.qt.nokia.com/browse/QTBUG-4756 bug report will help you.
-
Frank, don't think it is the reason, because after Q_OBJECT removing all compiling ok for author.
-
[quote author="QtK" date="1291378684"]Seems "this":http://bugreports.qt.nokia.com/browse/QTBUG-4756 bug report will help you.[/quote]
Ok, this is exactly my problem... I've tried to follow the instruction founded in the Bug Report to resolve the problem ("Opening the include directories for editing (without actually changing anything) and resaving them in Visual Studio corrected the problem."), but I didn't understand what exactly I need to do for "open include directories" ( I'm a quite new Visual Studio user :( ).