Qt Creator won't compile with boost [solved]
-
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? -
boost/serialization Is a directory ?
-
Yes it is. And i tried to include several other files/directories, and nothing worked
-
Well, what I meant is, in c++, you cannot include a directory, only files.
-
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
-
Hi,
Are you doing something like:
@INCLUDEPATH += /usr/include/boost@
and
@#include <boost/serialization/serialization.hpp>@
?
If so, remove boost from your INCLUDEPATH line
-
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@ -
What's the exact path to the include directory of boost ?
-
This should be the include path of boost : D:/boost_1_56_0/boost_1_56_0/boost
-
Then what do you currently have in that directory ?
-
Oh, i solved the problem. I actually just had to add "-lboost_serialization" at the end of the LIB line... Thank you
-
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 :)