Why would you have a "main.moc" file in the first place? .moc files are typically generated by the MOC compiler when processing a header file that contains the declaration of a class derived from QObject and which contains the Q_OBJECT macro. These types of classes are not typically declared in a .cpp file, especially main.cpp. Usually main.cpp is just a few lines of code containing the main() function that kicks off the app's execution.Any assistance would be greatly appreciated.
This was probably an error you made long ago when first making the project, something that left behind a main.moc file in your debug build directory that didn't get removed during a make clean or rebuild. I am pretty sure that if you simply comment out that line, your project will build, and if it does, delete the line altogether.
Edit - just noticed this. This almost certainly points to a previous version of the project where you had a QObject-based class defined in main.cpp that left behind some junk when you moved the class declaration out into its own file.versus having everything in my main.cpp




Reply With Quote

Bookmarks