Including moc files resulting a symbol not defined
-
Hi! I'm writing a plugin for Qt, starting from an already existing plugin in Qt. I'm experiencing something strange: at the end of a source file there is an inclusion of a .moc file, which is located somewhere in the Qt tree. If I remove that inclusion I get that a symbol is not defined in the library (I get an error runtime and that symbol is not in the shared lib indeed).
Anyone can explain why that is happening and how I can avoid it? The plugin I'm talking about is the LinuxTP mouse driver.
Thank! -
[quote author="Luc4" date="1305205052"]Hi! I'm writing a plugin for Qt, starting from an already existing plugin in Qt. I'm experiencing something strange: at the end of a source file there is an inclusion of a .moc file, which is located somewhere in the Qt tree. If I remove that inclusion I get that a symbol is not defined in the library (I get an error runtime and that symbol is not in the shared lib indeed).
Anyone can explain why that is happening and how I can avoid it? The plugin I'm talking about is the LinuxTP mouse driver.
Thank![/quote]It's a standard trick to fool qmake when you use Q_OBJECT classes in a .cpp file.