So I'm trying to build Maliit Framework https://github.com/maliit using Qt Creator on a Windows machine. I have fixed several windows compatibility issues so far: https://github.com/RHawkeyed/framework. But now I get this error: undefined reference to 'DummyInputMethod3::staticMetaObject'
in qobject.h
From answers to similar problems I found through google, this is often caused by not defining the qobject in a header, forgetting to add Q_OBJECT macro or moc not running properly. This does not seem to be the case here as DummyInputMethod3 is defined in its own header:
class DummyInputMethod3 : public MAbstractInputMethod
{
Q_OBJECT
...
And moc_dummyinputmethod3.cpp is generated in the path I would expect.
Also the header file is listed in the pro file as it should be:
HEADERS += \
dummyimplugin3.h \
dummyinputmethod3.h \
Any ideas about what might be wrong?
Getting the error when compiling this:
https://github.com/RHawkeyed/framework
in Qt Creator 3.5.0 using MinGW 4.9.2 32bit and Qt 5.5.0
The qmake files make use of several linux commands so I have added cygwin https://www.cygwin.com/ to the system path.
Compiling with msvc
I am not bound to a specific compiler, I just need to compile for windows. Compiling with msvc is perfectly acceptable. Actually I started out trying to compile with msvc, but after running into a number of problems and seeing suggestions that it is meant to be compiled with mingw I tried that instead. Anyway I can now compile up to the same error in both mingw and msvc:
https://github.com/RHawkeyed/framework
in Qt Creator 3.5.0
Qt 5.5
MSVC2013 32 bit
MAbstractInputMethod
does not derive fromQObject
. Alas, please first delete the entire build folder (build-...
above your source folder) and build again. – Kuba hasn't forgotten Monicaclass MAbstractInputMethod: public QObject { Q_OBJECT
– RHawkeyed