Question

I'm using qt and there's a problem here , when I include q_object it gives me these errors:

moc_finddialong.obj:-1: error: LNK2019: unresolved external symbol "private: void __cdecl Finddialong::findClicked(void)" (?findClicked@Finddialong@@AEAAXXZ) referenced in function "private: static void __cdecl Finddialong::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@Finddialong@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)

moc_finddialong.obj:-1: error: LNK2019: unresolved external symbol "private: void __cdecl Finddialong::enablefindButton(class QString const &)" (?enablefindButton@Finddialong@@AEAAXAEBVQString@@@Z) referenced in function "private: static void __cdecl Finddialong::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@Finddialong@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)

debug\try.exe:-1: error: LNK1120: 2 unresolved externals

,,

when I delete it and run qmake and compile it , the problem goes away , but I need q_object since my class has slots and signals.

Tried:

1-clean the project " I even started a new one " + run qmake and rebuild it and it didn't work.

2- checked if the header is included in the pro file and it is included.

that's about every solution I found in google.

Help pls.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top