Unresolved external symbol "public: virtual struct QMetaObject const * __thiscall Parent

后端 未结 23 2328
醉话见心
醉话见心 2020-11-30 21:33

I inherited a class from QObject :

class Parent: public QObject
{
    Q_OBJECT
    QObject* cl;

public:
    Parent(QObject *parent=0):QObject(parent) {
            


        
23条回答
  •  旧巷少年郎
    2020-11-30 22:36

    This happened to me recently when switching from MingW to MSVC. I had a prototyped class/struct listed as a class, and MingW didn't mind.

    MSVC definitely sees a difference between class and struct when prototyping is concerned.

    Hope that helps someone else one day.

提交回复
热议问题