Adding A library to a project



  • Im trying to add the well known boost library to my C++ Project using Qt Creator

    The downloaded boost file sits in my drive, say, C:\boost_1_54_0

    So in my Qt Creator project file I include the following:

    bq. INCLUDEPATH += C:\boost_1_54_0
    LIBS += -LC:\C:\boost_1_54_0\boost\algorith\string -lstring

    Im not too sure abour "-lstring", what must I put in this place?
    When including #include <boost/algorithm/string.hpp> in the main file I get the error that there is no such file or directory.

    How do I include libraries?


  • Lifetime Qt Champion

    Hi,

    Your include path doesn't look right. Don't you have a folder name "include" in your boost_1_54_0 directory ?

    Also, to avoid problems, you should replace all backslashes by forward slashes in your paths when using Qt.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.