Results 1 to 5 of 5

Thread: Adding an existing library to a project.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Adding an existing library to a project.

    Quote Originally Posted by wysota View Post
    Assuming you are using qmake to build your project, you need to add a LIBS directive to tell the compiler to link against your library. If the library is placed in a directory not usually looked into by the linker, you need to inform the compiler about that location (by adding a -L<directory> entry to LIBS).
    I think I tried that already, in the .pro page I wrote
    LIBS += -L(path to lib file's directory) -llibname
    It still writes "unresolved external....."
    I guess its something small im missing, hopefully.
    Thanks for the reply

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Adding an existing library to a project.

    (path to lib file's directory)
    Does this path have spaces in it? If so, you probably need to put it in quotes. What is the actual name of the library?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Adding an existing library to a project.

    What is the actual error you are getting? Did you verify the library exports that missing symbol?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Adding external library into Qt-Android project
    By Farrell in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 20th August 2023, 13:35
  2. Replies: 1
    Last Post: 3rd August 2016, 07:21
  3. Replies: 22
    Last Post: 1st February 2012, 21:56
  4. Adding library in another project
    By Anshuman in forum Qt Programming
    Replies: 1
    Last Post: 26th April 2011, 16:13
  5. adding dll to existing project...
    By aj2903 in forum Qt Programming
    Replies: 1
    Last Post: 1st December 2009, 09:35

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.