Boost “no such file or directory”

孤者浪人 提交于 2019-12-09 00:28:50

问题


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.


回答1:


In Ubuntu use

sudo apt-get install libboost-dev



回答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 /]# 


来源:https://stackoverflow.com/questions/12241152/boost-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!