Boost "no such file or directory"

Matthew picture Matthew · Sep 3, 2012 · Viewed 45.5k times · Source

I'm trying to set up my Code::Blocks work environment on a new computer and I'm having some problems. It's been a long time since I first did this, and now when I open my major project Boost is causing me problems.

I'm fairly new to C++ still and fixing this type of problem is something I have limited experience with.

When I open my project and try to compile it, I get this error:

fatal error: boost/algorithm/string.hpp: No such file or directory|

At this part of one of my header files:

#include <boost/algorithm/string.hpp>

I placed the Boost v1.51.0 library at C:\boost since that is where I'd had it on my other computer. My project is set to search that directory for additional includes but it doesn't seem to be finding the files?

My project used an older version of Boost previously but I doubt that's an issue.

I'm not sure how difficult it is to debug this problem with this limited information so if there's anything else I can provide please let me know.

I'm using Code::Blocks, and have just set up minGW and Visual C++ 2010.

Answer

Alfred Landik picture Alfred Landik · Sep 10, 2014

In Ubuntu use

sudo apt-get install libboost-dev