Results 1 to 2 of 2

Thread: How to add "Additional Dependencies" (Linker settings)

  1. #1
    Join Date
    Dec 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to add "Additional Dependencies" (Linker settings)

    Hello,

    For my project I have a documentation for Visual Studio C++. I need external libraries and include folders:

    • Include Directories => In QtCreator I do it like this: INCLUDEPATH+=C:\\Folder\\Folder2\\IncludeFolder
    • Linker Settings => LIBS+=C:\\Folder\\Folder2\\LibFolder
    • Additional Dependencies (found in Visual Studio C++ under Linker Settings -> Input) => But how do I add these .lib files in QtCreator to act like in VS??


    Thanks!


    Added after 1 8 minutes:


    Sorry, little misunderstanding.
    I didn't know THIS either.
    So I think LIBS+=C:\\Folder\\Folder2\\LibFolder\\extlib.lib should do the job.
    Last edited by tRs; 8th December 2011 at 13:04.

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: How to add "Additional Dependencies" (Linker settings)

    Actually, do this way:
    Qt Code:
    1. LIBS += -L"C:\\Folder\\Folder2\\LibFolder" -lextlib.lib
    To copy to clipboard, switch view to plain text mode 
    EDIT: This way works for both windows and linux, for win only you can simply do like you and docs suggest:
    Qt Code:
    1. LIBS += "C:\\Folder\\Folder2\\LibFolder\\extlib.lib"
    2. or
    3. LIBS += $$quote(C:/mylibs/extra libs/extra.lib)
    To copy to clipboard, switch view to plain text mode 
    Last edited by Oleg; 8th December 2011 at 18:11.
    Oleg Shparber

Similar Threads

  1. Replies: 3
    Last Post: 22nd February 2011, 08:53
  2. Replies: 3
    Last Post: 15th February 2010, 17:27
  3. windows xp "local security settings"
    By mickey in forum General Discussion
    Replies: 1
    Last Post: 7th August 2008, 03:54
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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.