PDA

View Full Version : Mocing error with Visual Studio Integration



anonyme_84
1st February 2008, 15:04
Hi,

I’m testing the compilation of a Qt Unix Project on Visual Studio with Qt Visual Studio Integration but I get the following error when mocing…


standard input(0): Warning: No relevant classes found. No output generated.

But when I generate moc files in command line, the meta object compiler generates files and I haven’t got any errors…

My solution is to generate them manually by command line and to add the generated files to the project .

I'm still looking for a more convenient solution.

Can somebody help me ?

Thanks

jpn
4th February 2008, 14:44
First of all, it's a warning, not an error. The reason for the warning is that there used to be a class with Q_OBJECT macro. A moc rule was created for corresponding file. Now that Q_OBJECT macro has been removed the corresponding moc step is unnecessary (but for some reason did not get properly removed), thus warning message.

anonyme_84
4th February 2008, 16:38
Hi,

I know it’s just a warning but without this generated file I can’t compile my project.

I don’t understand why moc doesn’t generated files with Visual Studio when files are generated in command line.


Visual Studio shows "Warning: No relevant classes found. No output generated."
Command line [moc -o moc_myfile.cpp myfile.h] generates a file ( not null )


Thanks...

jpn
4th February 2008, 16:39
Does this happen if you clean the project and re-import it from .pro file?