I'm building a big C++ project on Visual Studio 2008 I'm getting this error message and I don't understand it. Is it a failure to include the .h file?
我在Visual Studio 2008中构建一个大型c++项目,我收到了这个错误信息,我不理解它。包含.h文件是否失败?
2 个解决方案
#1
5
I know this thread is dated, but I had the exact same problem with a C++ project on Visual Studio 2008, here was my resolution...
我知道这个线程是过时的,但是我在Visual Studio 2008的c++项目中遇到了同样的问题,这是我的解决方案……
One of the things the VS2008 compile told me was that it generated a log on: "file://C:\Documents and Settings\adam\My Documents\Visual Studio 2008\Projects\MyProject\Debug\BuildLog.htm"
VS2008编译告诉我的一件事是,它生成了一个日志:“文件://C:\文件和设置\adam\我的文档\Visual Studio 2008\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
This log demystified the problem for me. In my case, it had the following explicit error message: c:\Documents and Settings\adam\My Documents\Visual Studio 2008\Projects\MyProject\MyProject\UnitTests.h(36): Error: Meta object features not supported for nested classes
这篇日志把我的问题神秘化了。在我的例子中,它有明确的错误信息如下:c:\Documents and Settings\adam\My文档Visual Studio 2008 \ \项目\ MyProject \ MyProject \ UnitTests.h(36):错误:元对象特性不支持嵌套类
The problem had been that INSIDE the class I defined here, I defined yet another internal (nested) class, that included the QT macro (so I could define signals and slots): Q_OBJECT
问题在于,在这里定义的类中,我定义了另一个内部(嵌套)类,其中包括QT宏(因此我可以定义信号和槽):Q_OBJECT。
Obviously QT wasn't happy that this class was nested/internal in another class. So I simply moved the class definition outside (IE made it non-internal).
显然,QT不高兴这个类在另一个类中嵌套/内部。因此,我只是将类定义移到外部(即非内部)。
#1
5
I know this thread is dated, but I had the exact same problem with a C++ project on Visual Studio 2008, here was my resolution...
我知道这个线程是过时的,但是我在Visual Studio 2008的c++项目中遇到了同样的问题,这是我的解决方案……
One of the things the VS2008 compile told me was that it generated a log on: "file://C:\Documents and Settings\adam\My Documents\Visual Studio 2008\Projects\MyProject\Debug\BuildLog.htm"
VS2008编译告诉我的一件事是,它生成了一个日志:“文件://C:\文件和设置\adam\我的文档\Visual Studio 2008\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
This log demystified the problem for me. In my case, it had the following explicit error message: c:\Documents and Settings\adam\My Documents\Visual Studio 2008\Projects\MyProject\MyProject\UnitTests.h(36): Error: Meta object features not supported for nested classes
这篇日志把我的问题神秘化了。在我的例子中,它有明确的错误信息如下:c:\Documents and Settings\adam\My文档Visual Studio 2008 \ \项目\ MyProject \ MyProject \ UnitTests.h(36):错误:元对象特性不支持嵌套类
The problem had been that INSIDE the class I defined here, I defined yet another internal (nested) class, that included the QT macro (so I could define signals and slots): Q_OBJECT
问题在于,在这里定义的类中,我定义了另一个内部(嵌套)类,其中包括QT宏(因此我可以定义信号和槽):Q_OBJECT。
Obviously QT wasn't happy that this class was nested/internal in another class. So I simply moved the class definition outside (IE made it non-internal).
显然,QT不高兴这个类在另一个类中嵌套/内部。因此,我只是将类定义移到外部(即非内部)。