Results 1 to 3 of 3

Thread: Undefined Reference to q libraries

  1. #1

    Default Undefined Reference to q libraries

    Hello,
    I am one day new to QT. I just installed Qt creator 2.0. I am trying to run one of the example projects that came with the install package but I am getting undefined references to Qlabel, QWidgets, QFontMetrics and many more. If I modify the .pro file as such LIBS += -l<QLabel>. I then get this error

    The system cannot find the file specified.
    mingw32-make[1]: *** [debug\fridgemagnets.exe] Error 1
    mingw32-make: *** [debug-all] Error 2
    The process "C:/Qt/2010.04/mingw/bin/mingw32-make.exe" exited with code %2.
    Error while building project fridgemagnets (target: Desktop)
    When executing build step 'Make'
    [/SIZE]


    I also added to the path variables C:\Qt\2010.04\qt\lib
    Any ideas??
    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    506
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Undefined Reference to q libraries

    Hi, you need QtGui and QtCore. Those contain the most important classes.

    Ginsengelf

  3. #3

    Default Re: Undefined Reference to q libraries

    I searched my system and found QtCore4.dll and
    QtGui4.dll here C:\Qt\2010.04\qt\bin and here C:\Qt\2010.04\bin. Presumably the 4 is a later version?
    Additionally I included those directories in the project PATH build environment. and removed the reference to LIBS += -l<QLabel> in the pro file becuase I added that to see if it would fix it. If I do add the LIBS += -l<QLabel> referecne, I get build error " cannot find the file specified" debug\fridgemagnets.exe] Error 1
    Thanks

Similar Threads

  1. undefined reference
    By digidas in forum Newbie
    Replies: 9
    Last Post: 19th May 2010, 13:04
  2. Undefined reference to crt
    By derektaprell in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2009, 08:34
  3. Undefined Reference To...
    By ManuMies in forum Qt Programming
    Replies: 6
    Last Post: 10th February 2009, 12:14
  4. Undefined reference
    By Salazaar in forum Newbie
    Replies: 12
    Last Post: 23rd May 2007, 10:21
  5. undefined reference to fftw libraries
    By kmyadam in forum General Programming
    Replies: 2
    Last Post: 9th March 2006, 01:01

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.