Results 1 to 2 of 2

Thread: How to link static libraries --- in .pro file settings?

  1. #1
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    110
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to link static libraries --- in .pro file settings?

    Hi, all:

    How can I setup the .pro file to make sure I can link with those static libraries?

    For instance, in my case, my compilation gave me the following error message


    Qt Code:
    1. cannot find -lutils
    To copy to clipboard, switch view to plain text mode 

    In fact, there is a
    Qt Code:
    1. libutils.a
    To copy to clipboard, switch view to plain text mode 
    right there.



    What's in my .pro file is like:
    Qt Code:
    1. LIBS += -L/usr/local/lib \
    2. -L../utils/bin/debug \
    3. -lutils \
    To copy to clipboard, switch view to plain text mode 

    Well, is
    Qt Code:
    1. -lutils \
    To copy to clipboard, switch view to plain text mode 
    the right way to link static libraries?


    How to link those static libraries produced by my own code?

    Cheers
    JIA
    Welcome to Vision Open
    http://www.visionopen.com

  2. #2
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    110
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to link static libraries --- in .pro file settings?

    sorry for my carelessness.

    Linux is case sensitive. My fault.

    Sorry again.
    Welcome to Vision Open
    http://www.visionopen.com

Similar Threads

  1. Link errors when linking chained libraries on windows
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2008, 14:52
  2. Dynamic link libraries
    By nareshqt in forum Qt Programming
    Replies: 6
    Last Post: 22nd April 2008, 06:20
  3. Replies: 2
    Last Post: 30th September 2007, 21:23
  4. having both static and dynamic libraries?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2007, 07:33
  5. static objects in libraries
    By Rawk in forum Qt Programming
    Replies: 3
    Last Post: 16th January 2007, 19:03

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.