[Qt-interest] problems with moc: Warning: No relevant classes found. No output generated.

John Vilburn john at ohanasoftware.com
Mon Apr 19 10:51:08 CEST 2010


The two most common reasons for this message are
1. Forgetting to put the Q_OBJECT macro in the class header.
2. A problem with the "#ifndef SPATIALQUERYPLUGIN_H" protection in the header file.

The code you posted does not seem to have either of these problems. Could there be something in qgisplugin.h that is stopping the remainder of the spatialqueryplugin.h from being processed?

John

On Apr 18, 2010, at 10:38 PM, G. Allegri wrote:

> Hi.
> I'm trying to compile my very first plugin for a qt based application (QGis).
> The base file is http://pastebin.com/Vbj0QEmx
> 
> As you can see, it includes the application headers (which is made of various QObjects), and the plugin is a Q_OBJECT itself.
> The cmake configure has generated the moc_*.cxx_parameters files (like this http://pastebin.com/y00VFyk9), but when I run moc.exe manually I get the following result:
> 
> "Warning: No relevant classes found. No output generated"
> 
> I wonder what is happening.
> I'm new to Qt, so I would need a help to understand why moc doesn't find "relevant classes" even if a Q_OBJECT is there in my header...
> 
> thank a lot,
> giovanni
> 
> PS: I'm working with VS 2008, CMake 2.8 and Qt 4.6.2 on Windows XP.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest





More information about the Qt-interest-old mailing list