Boost "no such file or directory"
Solution 1
In Ubuntu use
sudo apt-get install libboost-dev
Solution 2
Ensure that you have installed boost-devel package
In Centos execute as root:
yum install boost-devel
then
root@centos6 /]# find / -name boost
/usr/include/boost
/usr/lib64/boost
[root@centos6 /]#
Matthew
Updated on September 11, 2020Comments
-
Matthew over 3 years
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.
-
pyCthon over 11 yearsit's not linked properly , did you tell codeblocks where the library is? did you include the proper build flag? -lboost? or -I /path/to/boostlib/ -lboost?
-
Matthew over 11 yearsI haven't used build flags in the past - I don't understand how or where to use them?
-
-
m3nda about 8 yearsHave same problem here. I did compiled other sources using boost libraries, but this time doesn't work and I think I've installed the right packages. Why should be missing just a file? Why should be only a file not linked... it's supossed to found all files under same boost dir...
-
Gaurav Singh almost 6 years` C:\boost ` and "minGW and Visual C++ 2010" indicate that OP is using windows. Why instructions for ubuntu?
-
Gaurav Singh almost 6 years"C:\boost" and "minGW and Visual C++ 2010" Why instructions for centOS?
-
Zingg over 3 yearsOP is asking for help in Windows