undefined reference to `DummyInputMethod3::staticMetaObject' when trying to build maliit framework



  • 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 and I can't figure out why.

    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 qmake/moc not running properly. This does not seem to be the case here, I can't find any mistakes and a moc file is generated

    I am using Qt Creator 3.5.0 and Qt 5.5.0, compiling with MinGW 4.9.2 32bit or MSVC2013 32 bit

    The .pro and .pri files make use of several linux commands so I have added cygwin https://www.cygwin.com/ to the system path in order to run qmake.

    I have created a question on http://stackoverflow.com/questions/32378766/undefined-reference-to-dummyinputmethod3staticmetaobject-when-building-malii but so far no luck there.

    Anyone here have any ideas?


  • Moderators

    Is the generated moc file built and linked to your executable?



  • I am not 100% sure to be honest, how do I check that properly?



  • As far as I understand qmake should take care of it automatically right? It generates a makefile for dummyimplugin3 makefile.debug which has .moc\moc_dummyinputmethod3.cpp listed under SOURCES and .obj\moc_dummyinputmethod3.obj listed under OBJECTS

    From the compiler output it seems it gets built and linked?:

    cd dummyimplugin3\ && ( if not exist Makefile C:\Qt\5.5\msvc2013\bin\qmake.exe C:\QtProjects\MaliitFrameworkGitHub\framework\tests\dummyimplugin3\dummyimplugin3.pro -spec win32-msvc2013 "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug" -o Makefile ) && C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile
    	C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    	cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fd..\plugins\dummyimplugin3.pdb -DUNICODE -DWIN32 -DMALIIT_PLUGINS_DIR=\"/usr/lib/maliit/plugins\" -DMALIIT_PLUGINS_DATA_DIR=\"/usr/share/maliit/plugins\" -DMALIIT_FACTORY_PLUGINS_DIR=\"/usr/lib/maliit/plugins/factories\" -DMALIIT_EXTENSIONS_DIR=\"/usr/share/maliit-framework/extensions/\" -DMALIIT_TEST_PLUGINS_DIR=\"/usr/lib/maliit-framework-tests/plugins\" -DMALIIT_CONFIG_ROOT=\"/maliit/\" -DMALIIT_FRAMEWORK_USE_INTERNAL_API -D__PRETTY_FUNCTION__=__FUNCSIG__ -DNOXCB -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\framework\tests\dummyimplugin3 -I. -I..\..\..\framework\common -I..\..\..\framework\src -I..\..\src -IC:\Qt\5.5\msvc2013\include -IC:\Qt\5.5\msvc2013\include\QtQuick -IC:\Qt\5.5\msvc2013\include\QtGui -IC:\Qt\5.5\msvc2013\include\QtANGLE -IC:\Qt\5.5\msvc2013\include\QtQml -IC:\Qt\5.5\msvc2013\include\QtNetwork -IC:\Qt\5.5\msvc2013\include\QtCore -I.moc -IC:\Qt\5.5\msvc2013\mkspecs\win32-msvc2013 -Fo.obj\ @C:\Users\rh\AppData\Local\Temp\dummyimplugin3.obj.2640.0.jom
    dummyimplugin3.cpp
    	C:\Qt\5.5\msvc2013\bin\moc.exe -DUNICODE -DWIN32 -DMALIIT_PLUGINS_DIR=\"/usr/lib/maliit/plugins\" -DMALIIT_PLUGINS_DATA_DIR=\"/usr/share/maliit/plugins\" -DMALIIT_FACTORY_PLUGINS_DIR=\"/usr/lib/maliit/plugins/factories\" -DMALIIT_EXTENSIONS_DIR=\"/usr/share/maliit-framework/extensions/\" -DMALIIT_TEST_PLUGINS_DIR=\"/usr/lib/maliit-framework-tests/plugins\" -DMALIIT_CONFIG_ROOT=\"/maliit/\" -DMALIIT_FRAMEWORK_USE_INTERNAL_API -D__PRETTY_FUNCTION__=__FUNCSIG__ -DNOXCB -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_MSC_VER=1800 -D_WIN32 -IC:/Qt/5.5/msvc2013/mkspecs/win32-msvc2013 -IC:/QtProjects/MaliitFrameworkGitHub/framework/tests/dummyimplugin3 -IC:/QtProjects/MaliitFrameworkGitHub/framework/common -IC:/QtProjects/MaliitFrameworkGitHub/framework/src -IC:/QtProjects/MaliitFrameworkGitHub/build-maliit-framework-Desktop_Qt_5_5_0_MSVC2013_32bit-Debug/src -IC:/Qt/5.5/msvc2013/include -IC:/Qt/5.5/msvc2013/include/QtQuick -IC:/Qt/5.5/msvc2013/include/QtGui -IC:/Qt/5.5/msvc2013/include/QtANGLE -IC:/Qt/5.5/msvc2013/include/QtQml -IC:/Qt/5.5/msvc2013/include/QtNetwork -IC:/Qt/5.5/msvc2013/include/QtCore -I. ..\..\..\framework\tests\dummyimplugin3\dummyimplugin3.h -o .moc\moc_dummyimplugin3.cpp
    	C:\Qt\5.5\msvc2013\bin\moc.exe -DUNICODE -DWIN32 -DMALIIT_PLUGINS_DIR=\"/usr/lib/maliit/plugins\" -DMALIIT_PLUGINS_DATA_DIR=\"/usr/share/maliit/plugins\" -DMALIIT_FACTORY_PLUGINS_DIR=\"/usr/lib/maliit/plugins/factories\" -DMALIIT_EXTENSIONS_DIR=\"/usr/share/maliit-framework/extensions/\" -DMALIIT_TEST_PLUGINS_DIR=\"/usr/lib/maliit-framework-tests/plugins\" -DMALIIT_CONFIG_ROOT=\"/maliit/\" -DMALIIT_FRAMEWORK_USE_INTERNAL_API -D__PRETTY_FUNCTION__=__FUNCSIG__ -DNOXCB -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_MSC_VER=1800 -D_WIN32 -IC:/Qt/5.5/msvc2013/mkspecs/win32-msvc2013 -IC:/QtProjects/MaliitFrameworkGitHub/framework/tests/dummyimplugin3 -IC:/QtProjects/MaliitFrameworkGitHub/framework/common -IC:/QtProjects/MaliitFrameworkGitHub/framework/src -IC:/QtProjects/MaliitFrameworkGitHub/build-maliit-framework-Desktop_Qt_5_5_0_MSVC2013_32bit-Debug/src -IC:/Qt/5.5/msvc2013/include -IC:/Qt/5.5/msvc2013/include/QtQuick -IC:/Qt/5.5/msvc2013/include/QtGui -IC:/Qt/5.5/msvc2013/include/QtANGLE -IC:/Qt/5.5/msvc2013/include/QtQml -IC:/Qt/5.5/msvc2013/include/QtNetwork -IC:/Qt/5.5/msvc2013/include/QtCore -I. ..\..\..\framework\tests\dummyimplugin3\dummyinputmethod3.h -o .moc\moc_dummyinputmethod3.cpp
    	cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fd..\plugins\dummyimplugin3.pdb -DUNICODE -DWIN32 -DMALIIT_PLUGINS_DIR=\"/usr/lib/maliit/plugins\" -DMALIIT_PLUGINS_DATA_DIR=\"/usr/share/maliit/plugins\" -DMALIIT_FACTORY_PLUGINS_DIR=\"/usr/lib/maliit/plugins/factories\" -DMALIIT_EXTENSIONS_DIR=\"/usr/share/maliit-framework/extensions/\" -DMALIIT_TEST_PLUGINS_DIR=\"/usr/lib/maliit-framework-tests/plugins\" -DMALIIT_CONFIG_ROOT=\"/maliit/\" -DMALIIT_FRAMEWORK_USE_INTERNAL_API -D__PRETTY_FUNCTION__=__FUNCSIG__ -DNOXCB -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\framework\tests\dummyimplugin3 -I. -I..\..\..\framework\common -I..\..\..\framework\src -I..\..\src -IC:\Qt\5.5\msvc2013\include -IC:\Qt\5.5\msvc2013\include\QtQuick -IC:\Qt\5.5\msvc2013\include\QtGui -IC:\Qt\5.5\msvc2013\include\QtANGLE -IC:\Qt\5.5\msvc2013\include\QtQml -IC:\Qt\5.5\msvc2013\include\QtNetwork -IC:\Qt\5.5\msvc2013\include\QtCore -I.moc -IC:\Qt\5.5\msvc2013\mkspecs\win32-msvc2013 -Fo.obj\ @C:\Users\rh\AppData\Local\Temp\dummyinputmethod3.obj.2640.16.jom
    dummyinputmethod3.cpp
    	cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fd..\plugins\dummyimplugin3.pdb -DUNICODE -DWIN32 -DMALIIT_PLUGINS_DIR=\"/usr/lib/maliit/plugins\" -DMALIIT_PLUGINS_DATA_DIR=\"/usr/share/maliit/plugins\" -DMALIIT_FACTORY_PLUGINS_DIR=\"/usr/lib/maliit/plugins/factories\" -DMALIIT_EXTENSIONS_DIR=\"/usr/share/maliit-framework/extensions/\" -DMALIIT_TEST_PLUGINS_DIR=\"/usr/lib/maliit-framework-tests/plugins\" -DMALIIT_CONFIG_ROOT=\"/maliit/\" -DMALIIT_FRAMEWORK_USE_INTERNAL_API -D__PRETTY_FUNCTION__=__FUNCSIG__ -DNOXCB -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\framework\tests\dummyimplugin3 -I. -I..\..\..\framework\common -I..\..\..\framework\src -I..\..\src -IC:\Qt\5.5\msvc2013\include -IC:\Qt\5.5\msvc2013\include\QtQuick -IC:\Qt\5.5\msvc2013\include\QtGui -IC:\Qt\5.5\msvc2013\include\QtANGLE -IC:\Qt\5.5\msvc2013\include\QtQml -IC:\Qt\5.5\msvc2013\include\QtNetwork -IC:\Qt\5.5\msvc2013\include\QtCore -I.moc -IC:\Qt\5.5\msvc2013\mkspecs\win32-msvc2013 -Fo.obj\ @C:\Users\rh\AppData\Local\Temp\moc_dummyimplugin3.obj.2640.125.jom
    moc_dummyimplugin3.cpp
    	cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fd..\plugins\dummyimplugin3.pdb -DUNICODE -DWIN32 -DMALIIT_PLUGINS_DIR=\"/usr/lib/maliit/plugins\" -DMALIIT_PLUGINS_DATA_DIR=\"/usr/share/maliit/plugins\" -DMALIIT_FACTORY_PLUGINS_DIR=\"/usr/lib/maliit/plugins/factories\" -DMALIIT_EXTENSIONS_DIR=\"/usr/share/maliit-framework/extensions/\" -DMALIIT_TEST_PLUGINS_DIR=\"/usr/lib/maliit-framework-tests/plugins\" -DMALIIT_CONFIG_ROOT=\"/maliit/\" -DMALIIT_FRAMEWORK_USE_INTERNAL_API -D__PRETTY_FUNCTION__=__FUNCSIG__ -DNOXCB -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\..\framework\tests\dummyimplugin3 -I. -I..\..\..\framework\common -I..\..\..\framework\src -I..\..\src -IC:\Qt\5.5\msvc2013\include -IC:\Qt\5.5\msvc2013\include\QtQuick -IC:\Qt\5.5\msvc2013\include\QtGui -IC:\Qt\5.5\msvc2013\include\QtANGLE -IC:\Qt\5.5\msvc2013\include\QtQml -IC:\Qt\5.5\msvc2013\include\QtNetwork -IC:\Qt\5.5\msvc2013\include\QtCore -I.moc -IC:\Qt\5.5\msvc2013\mkspecs\win32-msvc2013 -Fo.obj\ @C:\Users\rh\AppData\Local\Temp\moc_dummyinputmethod3.obj.2640.125.jom
    moc_dummyinputmethod3.cpp
    	link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /OUT:..\plugins\dummyimplugin3.dll @C:\Users\rh\AppData\Local\Temp\dummyimplugin3.dll.2640.998.jom
       Creating library ..\plugins\dummyimplugin3.lib and object ..\plugins\dummyimplugin3.exp
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.