Boost logo

Boost Users :

Subject: [Boost-users] Boost build and first program
From: Great Avenger Singh (arsh840_at_[hidden])
Date: 2014-12-01 06:05:25

Hi I am first time boost user. I build it using following procedure on
Ubuntu Linux 14.04.

cd /boost-src/
./ and followed instructions. after the completion it gave
me following suggestion:

The Boost libraries were successfully built.

    Following directory should be included to compiler include paths;
    Following directory should be included to linker library paths;

Now I try to compile and program with following options from command line:

$ g++ -I "/home/metal-machine/boost-src/" -L
"/home/metal-machine/boost-src/stage/lib/" boostlist.cpp
-lboost_system -lboost_filesystem -o honey

$ ./honey

./honey: error while loading shared libraries: cannot open shared object file: No such
file or directory

But on the other hand if I compile and run as follows:

$ g++ boostlist.cpp -lboost_system -lboost_filesystem -o honey

$./honey ->it works fine

I am using thiscode:

Where I am doing wrong?

Arshpreet Singh
“If we all did the things we are really capable of doing, we would
literally astound ourselves …”
T. E.
Slashdot TV.
Video for Nerds.  Stuff that matters.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at