Results 1 to 10 of 10

Thread: Undefined reference to my signal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined reference to my signal

    AFAIK. If you add a file then make calls qmake first. Only when u add Q_OBJECT to the class do we need to call the qmake manually.
    We can't solve problems by using the same kind of thinking we used when we created them

  2. The following user says thank you to sunil.thaha for this useful post:

    PstdEr (23rd July 2013)

  3. #2
    Join Date
    Jan 2006
    Location
    Russia
    Posts
    16
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Undefined reference to my signal

    btw, there is a strange symbol (single quote) after "HEADERS" in the project file

  4. #3
    Join Date
    Jan 2006
    Location
    Poznań, Poland
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Wink Re: Undefined reference to my signal

    I found the apostrophe too, happily quickly
    I've been always executing `qmake && make` not to forget about the qmake.
    Thanks for your posts!

  5. #4
    Join Date
    Jan 2006
    Location
    Berlin, Germany
    Posts
    64
    Thanks
    1
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile Re: Undefined reference to my signal

    Quote Originally Posted by sunil.thaha
    Only when u add Q_OBJECT to the class do we need to call the qmake manually.
    This is good to know, I have been trying to run it after I add any new file regardless of of it Q_OBJECT-ed-ness. (although I tend to implement signals and slots heavily(maybe too much so!), so 80% of my new code is a Q_OBJECT...still good info!!! Thanks!)

    Katrina

  6. #5
    Join Date
    Apr 2011
    Posts
    231
    Thanks
    141
    Thanked 6 Times in 5 Posts

    Default Re: Undefined reference to my signal

    Missing Q_OBJECT in the class declaration also does lead to the same error: undefined reference to `MyThread::MySignal()'

  7. The following user says thank you to TheIndependentAquarius for this useful post:

    PstdEr (23rd July 2013)

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
  •  
Qt is a trademark of The Qt Company.