0

I tried to include the asio library from boost in QT Creator 3.2.2 (based on QT5.3.2), but when I try to run the code it tells me that he tells me

(...) Error: boost/asio.hpp: No such file or directory
#include <boost/asio.hpp>
                         ^ 

I downloaded and unpacked the library based on this: getting started

I then tried to link it to my project using this:

INCLUDEPATH += C:\Program Files\boost_1_57_0\boost

But aparently I am missing something, since it allways gives me this error when I hit on "run"

UPDATE: I tried to install it using this guide and can't run the example project as well, also because of a "not found" error

Nerethar
  • 327
  • 2
  • 16
  • 2
    have you tried adding the path to the include without the boost directory, that is: INCLUDEPATH += C:\Program Files\boost_1_57_0? – luantkow Feb 01 '15 at 17:55
  • yeah, I did this before but with the same effect. – Nerethar Feb 01 '15 at 18:01
  • I think the problem may be caused by the space in "Program Files", you could try [adding quotes to the path](http://stackoverflow.com/questions/10717359/in-a-qt-project-how-to-add-include-path-to-pro-under-windows-where-the-path-con) (or in case it does not work, moving the boost files to a directory without spaces). – llonesmiz Feb 01 '15 at 20:09
  • I tried that, but that did nothing – Nerethar Feb 01 '15 at 20:17
  • 1
    Try both!The boost include files are in the boost directory so you've gone one level too far and windows still doesn't like spaces in path names see: [variable-with-spaces-in-the-path](http://stackoverflow.com/questions/1851012/set-a-path-variable-with-spaces-in-the-path-in-a-windows-cmd-file-or-batch-file) – kenba Feb 02 '15 at 08:04

0 Answers0