Results 1 to 2 of 2

Thread: QtCreator .pro file question

  1. #1
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QtCreator .pro file question

    I can't seem to get a library linked. The library is libusb-1.0.


    I have the following line in my .pro file:
    LIBS += -L/usr/local/lib -llibusb-1.0


    I get the following error during a build (clean/qmake/rebuild all):
    /usr/bin/ld: cannot find -llibusb-1.0


    I'm sure that the library is on my system. The results of #locate libusb-1.0:

    /usr/local/include/libusb-1.0
    /usr/local/include/libusb-1.0/libusb.h
    /usr/local/lib/libusb-1.0.a
    /usr/local/lib/libusb-1.0.la
    /usr/local/lib/libusb-1.0.so
    /usr/local/lib/libusb-1.0.so.0
    /usr/local/lib/libusb-1.0.so.0.0.0
    /usr/local/lib/pkgconfig/libusb-1.0.pc


    I tried changing the .pro line to all of these with no success:
    LIBS += -L/usr/local/lib -llibusb-1.0.so
    LIBS += -L/usr/local/lib -llibusb-1.0.so.0
    LIBS += -L/usr/local/lib -llibusb-1.0.so.0.0.0



    Any ideas what I'm not doing or doing incorrectly?

    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: QtCreator .pro file question

    Qt Code:
    1. -llibusb-1.0
    To copy to clipboard, switch view to plain text mode 
    I think the "lib" is not needed here, try
    Qt Code:
    1. -lusb-1.0
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Qt Creator Question about Fake Vim in QtCreator 1.3.1 !
    By qt_chan in forum Qt Tools
    Replies: 3
    Last Post: 11th November 2011, 00:08
  2. QtCreator - question on shortcut key
    By Qqt in forum Qt Tools
    Replies: 4
    Last Post: 8th January 2011, 13:29
  3. Replies: 8
    Last Post: 24th November 2010, 11:34
  4. Replies: 9
    Last Post: 17th November 2010, 08:18
  5. Qt Creator Backwards compatibility question Qt and QtCreator
    By spawn9997 in forum Qt Tools
    Replies: 3
    Last Post: 4th February 2010, 18:41

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.