Results 1 to 7 of 7

Thread: New to QT

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    5

    Default New to QT

    I'm just trying to run the program, but I get this errror with respect to the class:

    :-1: error: collect2: ld returned 1 exit status

    I only get this error when I do T : public QObject
    (Adding QObject)

    Help would be appreciated! Thanks

    Qt Code:
    1. #ifndef T_H
    2. #define T_H
    3.  
    4. #include <QString>
    5. #include <QObject>
    6.  
    7. class T : public QObject
    8. {
    9. public:
    10. T() {}
    11. };
    12.  
    13. #endif // T_H
    To copy to clipboard, switch view to plain text mode 



    Qt Code:
    1. #include <QtCore/QCoreApplication>
    2. #include <QtDebug>
    3.  
    4.  
    5. #include <QString>
    6.  
    7. #include "T.h"
    8.  
    9.  
    10.  
    11. int main(int argc, char *argv[])
    12. {
    13. QCoreApplication aa(argc, argv);
    14.  
    15. T ok();
    16.  
    17.  
    18.  
    19. qDebug() << "ok";
    20.  
    21. return aa.exec();
    22. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by intek; 6th March 2009 at 00:16.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.