Results 1 to 2 of 2

Thread: Undefined reference MyWidget::....()

  1. #1
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Undefined reference MyWidget::....()

    Hi all,
    I'm still quite new to QT (duuhh) but I encounterd a problem:
    When I try to compile my program it gives:
    undefined reference to MyWidget::newValue(int)
    does annyone know why this is?
    I attached my .cpp file to this post so you can see the code.

    I also tried to put this connect stuff in the function leesin() (that's where the error is) in a different place, but it didn't work out because the objects are not defined in different functions.

    Any help is appriciated
    Thanx!

    Extra info:
    Version: QT 4.3.4
    Platform: Windows XP
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Undefined reference MyWidget::....()

    Did you rerun qmake after adding the signal to the class definition? If you did and it still doesn't work, clean your project and recompile it again. Especially make sure all moc_* files are deleted and recreated again during the compilation.

Similar Threads

  1. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  2. MS Sql native driver??
    By LordQt in forum Qt Programming
    Replies: 4
    Last Post: 9th October 2007, 13:41
  3. error undefined reference ...............
    By amit_pansuria in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2007, 14:28
  4. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15
  5. Strange error while using Q3Canvas
    By Kapil in forum Newbie
    Replies: 13
    Last Post: 15th June 2006, 19:36

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.