I get unresolved external symbols concerning Q_OBJECT
Solved
General and Desktop
-
wrote on 7 Oct 2024, 22:04 last edited by jdent 10 Jul 2024, 22:05
unresolved external symbol "public: virtual struct QMetaObject const * __cdecl VectorModel::metaObject(void)const " (?metaObject@VectorModel@@UEBAPEBUQMetaObject@@XZ::<!VectorModel>) unresolved external symbol "public: virtual void * __cdecl VectorModel::qt_metacast(char const *)" (?qt_metacast@VectorModel@@UEAAPEAXPEBD@Z::<!VectorModel>) unresolved external symbol "public: virtual int __cdecl VectorModel::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@VectorModel@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z::<!VectorModel>)
I am using C++ 20 modules....
-
Hi,
AFAIR (and this ticket seems to agree with my memory), the module support is not yet implemented in moc.
-
wrote on 7 Oct 2024, 22:29 last edited by
when I remove VectorModel from a C++ 20 module, I get the opposite linker warnings (multiply defined symbols found) - why??
1>moc_VectorModel.obj : error LNK2005: "public: static struct QMetaObject const VectorModel::staticMetaObject" (?staticMetaObject@VectorModel@@2UQMetaObject@@B) already defined in moc_VectorModelImpl.obj 1>moc_VectorModel.obj : error LNK2005: "private: static void __cdecl VectorModel::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@VectorModel@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z) already defined in moc_VectorModelImpl.obj
and others...
-
wrote on 8 Oct 2024, 00:04 last edited byThis post is deleted!
-
unresolved external symbol "public: virtual struct QMetaObject const * __cdecl VectorModel::metaObject(void)const " (?metaObject@VectorModel@@UEBAPEBUQMetaObject@@XZ::<!VectorModel>) unresolved external symbol "public: virtual void * __cdecl VectorModel::qt_metacast(char const *)" (?qt_metacast@VectorModel@@UEAAPEAXPEBD@Z::<!VectorModel>) unresolved external symbol "public: virtual int __cdecl VectorModel::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@VectorModel@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z::<!VectorModel>)
I am using C++ 20 modules....
-
wrote on 8 Oct 2024, 16:49 last edited by
How do I know that?
-
Hi,
AFAIR (and this ticket seems to agree with my memory), the module support is not yet implemented in moc.
-
wrote on 8 Oct 2024, 20:02 last edited by
thanks!!
-
6/7