qml - Custom Qt widget example in Qt Creator errors -


i'm qt beginner, have 5.2.1 version , trying learn qt/qml book on github. however, 1 of basic examples:

#ifndef customwidget_h #define customwidget_h  #include <qtwidgets>  class customwidget : public qwidget {     q_object public:     explicit customwidget(qwidget *parent = 0);     void paintevent(qpaintevent *event);    void mousepressevent(qmouseevent *event);    void mousemoveevent(qmouseevent *event); private:      qpoint m_lastpos; };  #endif // customwidget_h 

and here errors get:

ln function `_start'

undefined reference `main'

collect2: ld returned 1 exit status

i have no idea of these mean, appreciated. made project qt quick application.

these included in .pro file

qt += core gui  greaterthan(qt_major_version, 4): qt += widgets 

first should go google , errors, can find them , solution, , solutions here in stackoverflow too.

for can , hope helps you:

  1. ln function _start' don't know mean, can copy full error? maybe this can you

  2. undefined reference main' doing example in new project supose there no main() function, basic program run. can add main.cpp or declare globaly void main() {}try looking @ this , this

  3. collect2: ld returned 1 exit status means wrong (there errors before line), that's why last error.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -