Results 1 to 10 of 10

Thread: undefined reference

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default undefined reference

    Hi there,
    as a complete newbie to both qt and C++ i am trying to reproduce the examples textfinder and addressbook.
    All goes well until i come to the slots part where i declare:

    Qt Code:
    1. private slots:
    2. void on_findButton_clicked();
    To copy to clipboard, switch view to plain text mode 

    The complete code in textfinder.h is below
    The debug error i get is:
    debug/moc_textfinder.o:C:\qtbron\textfinder/debug/moc_textfinder.cpp:72:
    undefined reference to `textfinder:n_findButton_clicked()'

    I guess it is enviremental but have no clue.

    Thanks in advance.


    Qt Code:
    1. #ifndef TEXTFINDER_H
    2. #define TEXTFINDER_H
    3.  
    4. #include <QWidget>
    5. #include <QObject>
    6.  
    7. namespace Ui {
    8. class textfinder;
    9. }
    10.  
    11. class textfinder : public QWidget {
    12. Q_OBJECT
    13. public:
    14. textfinder(QWidget *parent = 0);
    15. ~textfinder();
    16. protected:
    17. void changeEvent(QEvent *e);
    18. private:
    19. Ui::textfinder *ui;
    20. void loadTextFile();
    21. private slots:
    22. void on_findButton_clicked();
    23.  
    24. };
    25.  
    26. #endif // TEXTFINDER_H
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 18th May 2010 at 15:23. Reason: missing [code] tags

Similar Threads

  1. Undefined reference to my signal
    By tomek in forum Newbie
    Replies: 9
    Last Post: 1st December 2011, 07:14
  2. undefined reference
    By jayreddy in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:45
  3. Undefined reference to crt
    By derektaprell in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2009, 08:34
  4. Undefined Reference To...
    By ManuMies in forum Qt Programming
    Replies: 6
    Last Post: 10th February 2009, 12:14
  5. Undefined reference
    By Salazaar in forum Newbie
    Replies: 12
    Last Post: 23rd May 2007, 10:21

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.