23

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.

Matthew
  • 451
  • 1
  • 6
  • 14
  • 2
    it'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? – pyCthon Sep 03 '12 at 02:52
  • I haven't used build flags in the past - I don't understand how or where to use them? – Matthew Sep 03 '12 at 03:04

2 Answers2

30

In Ubuntu use

sudo apt-get install libboost-dev
Alfred Landik
  • 454
  • 4
  • 7
  • 1
    Have 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... – m3nda Mar 25 '16 at 22:16
  • 9
    ` C:\boost ` and "minGW and Visual C++ 2010" indicate that OP is using windows. Why instructions for ubuntu? – Gaurav Singh Jun 28 '18 at 10:28
7

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 /]# 
Oscar Raig Colon
  • 1,302
  • 12
  • 14