Results 1 to 6 of 6

Thread: How do I point to a C++ library (non Qt library)

  1. #1
    Join Date
    Jun 2012
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Smile How do I point to a C++ library (non Qt library)

    How do I point to a C++ library in Qt. Should I duplicate the below line in the dot pro file and point to a specific file:

    include(../../src/qtsoap.pri)

    EG: include(C:/abc/def/First Name Library)

    When I do this and look at the compile output, I do not see the new path being used.

    Is there some kind of instuction such as the below one that I should be using:

    library(C:/abc/def/First Name Library)

    Thank you,
    Chris L.
    Last edited by ChrisL1234; 6th June 2012 at 22:02. Reason: updated contents

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

    Default Re: How do I point to a C++ library (non Qt library)

    qmake Code:
    1. LIBS += -Lpath/to/library -lnameoflibrary
    To copy to clipboard, switch view to plain text mode 
    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.


  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,590
    Thanks
    13
    Thanked 1,586 Times in 1,515 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How do I point to a C++ library (non Qt library)


  4. #4
    Join Date
    Jun 2012
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do I point to a C++ library (non Qt library)

    What do I do if the path to the library folder contains many blank characters? Which of the below declarations is most correct. Can I specify just the folder, or should I specify a particular file in that folder.

    (1) LIBS += C:/Temp/The C++ Library/code is here/library

    (2) LIBS += "C:/Temp/The C++ Library/code is here/library"

    (3) LIBS += 'C:/Temp/The C++ Library/code is here/library'

    Below Contains many blanks after the "+=":

    (4)
    Qt Code:
    1. LIBS += C:/Temp/The C++ Library/code is here/library
    To copy to clipboard, switch view to plain text mode 
    (5)
    Qt Code:
    1. LIBS += "C:/Temp/The C++ Library/code is here/library"
    To copy to clipboard, switch view to plain text mode 
    (6)
    Qt Code:
    1. LIBS += 'C:/Temp/The C++ Library/code is here/library'
    To copy to clipboard, switch view to plain text mode 
    Thank you,
    Chris L.
    Last edited by ChrisL1234; 7th June 2012 at 14:48.

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

    Default Re: How do I point to a C++ library (non Qt library)

    Apart from 1 and 4 they are all equivalent. Why don't you just try them all yourself and see what works and what doesn't?
    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.


  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,590
    Thanks
    13
    Thanked 1,586 Times in 1,515 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How do I point to a C++ library (non Qt library)

    You might also look in the qmake manual for the quote() function.

Similar Threads

  1. Replies: 3
    Last Post: 21st June 2011, 20:37
  2. Replies: 1
    Last Post: 3rd December 2009, 15:23
  3. display a plot point by point
    By oswalidos in forum Newbie
    Replies: 32
    Last Post: 13th March 2009, 16:37
  4. how to paint scene point by point
    By elessaar in forum Qt Programming
    Replies: 8
    Last Post: 4th September 2008, 21:00
  5. how to point to the library!!?
    By drinu21 in forum Qwt
    Replies: 1
    Last Post: 25th November 2007, 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.