[ACCEPTED]-Install and build Boost library in Linux-boost

Accepted answer
Score: 17
sudo apt-get install libboost-regex-dev

Don't bother installing from source where 5 a much more intelligent system can do better.

To 4 compile, just use

g++ -lboost_regex boost.cpp -o boost

To get list of available 3 package names (more parts of boost):

apt-cache search libboost | grep -- -dev

Dislaimer: I 2 assume you use Debian since that's what 1 your GCC version reports.

Score: 8

I found the problem! g++ command problem! :( sorry. If 2 I move back -l option to the end of the 1 line, it does not complain more :)

Score: 2

Your

-L./boost/lib

seems suspect. When you build Boost, the 6 libraries are put into stage/lib directory. Also, the 5 default build process does not create static 4 libraries, so you probably better take -static off 3 the command line. If that does not fix the 2 problem, I suggest you follow the steps 1 at my blog to troubleshoot this.

More Related questions