Avatar of JPERKS1985
JPERKS1985
 asked on

Including Boost library

I'm trying to include a boost header file.


#include <boost/algorithm/string.hpp>

Returns,
Error      1      error C1083: Cannot open include file: 'boost/algorithm/string.hpp': No such file or directory      c:\users\null\documents\visual c++ projects\clientsocket\socketmanager.cpp      9      1      ServerSocket

The boost header folder is right in with my other files,

C:\Users\NULL\Documents\Visual C++ Projects\ClientSocket\boost
C++

Avatar of undefined
Last Comment
evilrix

8/22/2022 - Mon
evilrix

have you included boost in your compiler's header search path?

>> The boost header folder is right in with my other files,
That's not where they should be. I suggest you install boost properly using the boostpro packages and then set up your include paths.

http://www.boostpro.com/download/
ambience

how about

#include "boost/algorithm/string.hpp"
JPERKS1985

ASKER
When i use the installer and have the files located under program files/boost and include them i get an access denied error message.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
evilrix

>> When i use the installer and have the files located under program files/boost and include them i get an access denied error message.

What version of Windows/Visual Studio are you using? Do you have the most up-to-date service packs for Visual Studio (there are some issues with Vista/Windows 7 that require an update to work properly)?

I presume if you just open one of the header files in notepad you can?
JPERKS1985

ASKER
I'm using VS2010. I also can't create new C++ projects without getting errors and VS crashing. I'll check the service packs.
JPERKS1985

ASKER
Installing VS2010 SP1 didn't help


When I use

#include "boost/filesystem.hpp"

I get,

      1      IntelliSense: cannot open source file "boost/config.hpp"      c:\users\null\documents\visual c++ projects\clientsocket\boost\filesystem.hpp      15      1      ServerSocket

looks like it can load filesystem.hpp but can't find the dependencies. I've tried editing the includes in the other files by removing a slash or adding a slash and then it can load them but I do not want to have to do this.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
JPERKS1985

ASKER
JPERKS1985

ASKER
I've requested that this question be closed as follows:

Accepted answer: 0 points for JPERKS1985's comment #37997761

for the following reason:

Alternate source.
ASKER CERTIFIED SOLUTION
evilrix

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question