Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
2.1.1
-
Qt5.6.2, VS2015, using PCH.
-
af5dcc0ac037b902c6ce87fca7f71bdaeab96e41
Description
Saving a header file containing the "Q_OBJECT" macro to the project does not result in valid moc steps being generated for the file.
Adding an existing header file containing the "Q_OBJECT" macro to the project does not result in any moc_XXX.cpp files being added to the project, or any moc steps being generated for the file.
The linker then fails with missing implementations for QMetaObject etc.
I tried the old workaround of commenting out Q_OBJECT saving, uncommenting and then resaving.
This resulted in the "moc_MyObject.cpp" files being added to the vcxproj, but the actual moc "CustomBuild" steps were not added and so it could not be compiled.
I am not aware of any other methods of forcing the add-in to rescan the header file.
Attachments
Issue Links
- duplicates
-
QTVSADDINBUG-396 Add new item with VS does not generate the moc
- Closed