Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
3.3.1 (rev.39)
-
None
-
-
Windows
Description
If a QObject derived class declares the Q_OBJECT macro in. h, and the definition of this class is wrapped by other preprocessors, such as the following:
#ifdef Q_OS_WIN
class KWordConverter : public QObject
#endif
In this case, no meta object data will be generated for the KWordConverter class, resulting in link failure:
Unresolvable external symbol 'public: virtual struct QMetaObject const * __cdecl KWordConverter:: metaObject (void) const' ? metaObject@KWordConverter @@UEBAPEBUQMetaObject@@XZ)
If it has not been pre processed by # ifdef Q_OS_WIN, there will be no problem. The previous version of VSTools(2.9) also did not have this issue. I have checked the compilation configuration and it is also fine: