Answer the question
In order to leave comments, you need to log in
How to connect Boost to Qt Creator?
You need to connect the boost / asio library to the project (pure C ++ console application for practice) in qt creator.
I downloaded the sources from the site. I read that asio does not need to be built and everything is in headers.
I read in Google that it is enough to add a directory to INCLUDEPATH += .
Added INCLUDEPATH += C:/WORK/boost_1_59_0
.
After that, auto-completion works in the editor in #include "boost/asio.hpp"
.
But when compiling, it gives
C1083: Cannot open include file: 'boost/asio.hpp': No such file or directory
C1083: Cannot open include file: 'winsock2.h': No such file or directory
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc120-mt-gd-1_59.lib'
Answer the question
In order to leave comments, you need to log in
In general, everything was decided by the fact that it was necessary to correctly write everything to the project file (* .pro) and press qmake.
At the same time, although the original library (asio) is based only on headers and implementations, it uses other Boost libraries and, accordingly, includes / includes them when the corresponding .hpp is included.
That is, it was necessary to pre-assemble the entire boost with your compiler in either, or download ready-made ones for Windows from the off site.
As a result, the .pro file is added
INCLUDEPATH += C:/WORK/boost_1_59_0
LIBS += "-LC:\WORK\boost_1_59_0\lib64-msvc-12.0"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question