Boost logo

Boost Users :

From: John Phillips (phillips_at_[hidden])
Date: 2007-05-04 12:52:19


Marc Glenn wrote:
> Hello all,
>
> I am new to using Boost Libraries...
> I am wondering how I can indicate that the compiler links the
> specific boost libraries...
> For example.. *"gcc -o thread_example thread.cpp -lpthread*" uses
> -lpthread option which is the posix threads library
>
> I can't find the list of the options to link the specific boost
> libraries.
> I have scanned the documentation of the libraries but they have not
> provided any sample on compiling programs using boost libraries.
>
> Thanks for the help..
>
> Marc Glenn
>

   In many cases, there is little to add (and so the silence). Since
many boost libraries are header only, they need to be in the include
path, but they don't need to be in the library path. The include path
needed is just enough to get to the /boost directory of the
installation. The #include commands used are written so detailed include
paths are not needed.
In the cases where they do need to be included in the library path, it
is for the libraries that have an explicitly compiled section during the
installation process. The getting started guide in CVS (which will ship
with 1.34) includes a list of these and instructions for how to call
libraries. The name for the file includes the compiler the file was
produced for, si it will not be the same in all cases.

                        John Phillips


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net