Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to code an application for a Raspberry Pi 3 using Visual Studio 2019. In my application, i would like to use some feature from the boost library.

But when i build the application, i get this annoying error message, and have no idear about what i am doing wrong.
error : boost\program_options.hpp: No such file or directory
error : #include "boost\program_options.hpp"
error : ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error : compilation terminated.


I have downloaded v1.7.0 from the boost.org website and installed it on the Pi, using this commands:
cd /usr/

sudo tar --bzip2 --xf <path to archive>.tar.bz2

sudo ./bootstrap.sh

sudo ./b2 install


What I have tried:

My configuration in visual studio looks like this.
<C/c++> --> <General>--><Additional Include Directories>-->/usr/include
Posted
Updated 20-Oct-19 10:49am

By default boost is installed in /usr/local/include (and /usr/local/lib), see for instance, this page: c++ - what is the default location for boost library when installed using macport on mac ? - Stack Overflow[^].
 
Share this answer
 
Comments
Member 14125253 18-Oct-19 4:28am    
Hi CPallini,

I have the followering configurations for my project.
"C/C++" --> "General" --> "Additional Include Directories" --> /usr/local/include
"Linker" --> "General" --> Additional Library Directories" --> /usr/local/lib

But still gets the same error.
It looks to me like Intellisense dosen't download all the need files and directories, if i look in the folder on my local computer, /usr/local/lib is missing.
Found the problem, i used backslash in the include, it has to be a forward slash
#include <boost/program_options.hpp>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900