Results 1 to 4 of 4

Thread: how to solve the ld error: library not found for -lqwt ?

  1. #1
    Join Date
    Sep 2011
    Posts
    30
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default how to solve the ld error: library not found for -lqwt ?

    I'm try to port my Qt/Qwt application from linux to Mac platform, I have compiled the Qwt with Qt4 on Mac platform and install it into $(HOME)/QtSDK/Desktop/Qt/474/gcc/lib and then compile my application, it can pass the compile but failed on ld, tell me ':-1: error:library not found for -lqwt', could you please give me some suggestion? thanks.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: how to solve the ld error: library not found for -lqwt ?

    You need to make sure that path where the qwt library file is located, is included with LIBS += -L/path/to/qwt/lib in .pro file. Also make sure that the library file name matches the linker settings (LIBS += -lqwt) in .pro file.

  3. #3
    Join Date
    Sep 2011
    Posts
    30
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: how to solve the ld error: library not found for -lqwt ?

    i have fixed the issue by change the -lqwt to -fqwt, but there is another error pop up,
    Undefined symbols for architecture x86_64:
    "QwtSamplingThread::QwtSamplingThread(QObject* )", referenced from:
    SamplingThread::SamplingThread(QObject*)in samplingthread.o
    SamplingThread::SamplingThread(QObject*)in samplingthread.o

  4. #4
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to solve the ld error: library not found for -lqwt ?

    I don't think you've fixed anything using -f flag.
    -f
    --auxiliary name
    When creating an ELF shared object, set the internal DT_AUXILIARY
    field to the specified name. This tells the dynamic linker that
    the symbol table of the shared object should be used as an auxil-
    iary filter on the symbol table of the shared object name.
    Go back to using -l and fix the path as it's obviously wrong.

    Use absolute paths if you don't know how to use qmake variables.
    Start a console, go to directory where you have the qwt library, use 'pwd' to get full path and use that path.

Similar Threads

  1. library not found for -lnsl - What should I do? (MAC)
    By rickrvo in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2011, 16:38
  2. QT Core Library Not Found
    By RyanS09 in forum Newbie
    Replies: 2
    Last Post: 26th April 2011, 09:51
  3. Library woes - can't be found
    By waynew in forum Newbie
    Replies: 5
    Last Post: 23rd November 2010, 23:30
  4. Replies: 4
    Last Post: 20th May 2009, 10:20
  5. start application: Why this error and how to solve it?
    By Colx007 in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2008, 15:22

Tags for this Thread

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.