Hi all,

2009/8/25 Chris Uzdavinis <cuzdav@gmail.com>
On Tue, Aug 25, 2009 at 11:58 AM, Vladimir
Prus<vladimir@codesourcery.com> wrote:
> Shaolin wrote:

>> How do I include boost dependencies in my makefile ?
>>
>> /usr/local/boost_1_39_0/boost/stage/lib/libboost_program_options-gcc43-mt-1_39.a
>> /usr/local/boost_1_39_0/boost/stage/lib/libboost_thread-gcc43-mt-1_39.a
>> -lpthread
>
> You add those to the linker invocation command in your makefile.
> Alternatively, you can use:
>
>        -L/usr/local/boost_1_39_0/boost/stage/lib/ -lboost_program_options-gcc43-mt-1_39
>        -lboost_thread-gcc43-mt-1_39 -lpthread
>
> Note that this question has nothing to do with C++ Boost. I recommend
> that you read manuals on make and gcc to get more detailed answer.

I think the question he was asking wasn't how to use make, but the boost
sorta-specific problem of linking the correct boost library depending on
whether we are building release, debug, multi-threaded, and so on.  Since
the spelling changes, it can be painful to manage by hand.

We built a make-based build system that supports some of boost name
generation, such as

BOOST_LIBS += thread

it would generate the proper link line, with the properly decorated library name
based on whether or not we're building in release or debug, multi-thread or
single, etc.

I think that a "standard" boost makefile library that can be included by other
makefiles to  make it easier to include and link boost libs would be
very useful.

CMake is of great help for that!

Regards,

Olivier
 


Chris
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users