List Info

Thread: build lib/dll




build lib/dll
user name
2006-02-27 22:36:00
"Gennadiy Rozental" <gennadiy.rozentalthomson.com> wrote in message 
news:dtvro7$7l6$1sea.gmane.org...
> Getting started question: how to build only lib or only
dll?


That is controlled by the <link> feature. 
<link>shared or <link>static

For a given lib target, you can specify your preference in
the requirements 
section.

# builds a static lib
lib foo
    : # sources
        test.cpp
    : # requirements
        <link>static
    ;

# builds a "dll"
lib bar
    : # sources
        test.cpp
    : # requirements
        <link>shared
    ;

You could also specify the requirement in a project if you
wanted all libs 
to be built a particular way.

# In Jamroot
project
    : requirements
        <link>static
    ;

Finally, if you haven't made it an explicit requirement
(which I don't 
believe can be overridden) then you can specify a different
value for the 
feature on the command line. e.g. If none of the
<link> lines were in the 
targets above, you could run
bjam link=static
and you would get static libs instead of the default shared.

You could even run
bjam link=static link=shared
And it would build both libs and dlls.

hth,
Daniel Einspanjer 


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )