Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Qt Creator won't compile with boost [solved]

    Installation and Deployment
    3
    12
    3096
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kimerafusion last edited by

      Hey there, I'm trying to use boost in a qt project (archives and serialization), but when i write "#include <boost/serialization>", even if my qt creator detects the files (it displays the list of files i may include) the compiler will keep saying that there is no such file or directory. I'm using qt creator 5.3.2 with msvc 2013, and i added the lines " INCLUDEPATH += pathtoboost"
      And "LIBS += -Lpathtoboost"
      What have i done that is not right?

      1 Reply Last reply Reply Quote 0
      • S
        sandy.martel last edited by

        boost/serialization Is a directory ?

        1 Reply Last reply Reply Quote 0
        • K
          kimerafusion last edited by

          Yes it is. And i tried to include several other files/directories, and nothing worked

          1 Reply Last reply Reply Quote 0
          • S
            sandy.martel last edited by

            Well, what I meant is, in c++, you cannot include a directory, only files.

            1 Reply Last reply Reply Quote 0
            • K
              kimerafusion last edited by

              Oh god i did not know that. I also tried to include <boost/serialization/serialization.hpp> and it kept saying that this file doesn't exist

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Hi,

                Are you doing something like:

                @INCLUDEPATH += /usr/include/boost@

                and

                @#include <boost/serialization/serialization.hpp>@

                ?

                If so, remove boost from your INCLUDEPATH line

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • K
                  kimerafusion last edited by

                  Well I'm on windows, and these are the two lines i'm adding to the .pro file
                  @INCLUDEPATH += D:/boost_1_56_0/boost_1_56_0/boost
                  LIBS += -LD:/boost_1_56_0/boost_1_56_0/stage/lib@

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    What's the exact path to the include directory of boost ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply Reply Quote 0
                    • K
                      kimerafusion last edited by

                      This should be the include path of boost : D:/boost_1_56_0/boost_1_56_0/boost

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Then what do you currently have in that directory ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply Reply Quote 0
                        • K
                          kimerafusion last edited by

                          Oh, i solved the problem. I actually just had to add "-lboost_serialization" at the end of the LIB line... Thank you

                          1 Reply Last reply Reply Quote 1
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            Not exactly the error related to include paths :D

                            Anyway, nice you found out. Please update the thread title prepending [solved] so other forum users may know a solution has been found :)

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post