Boost logo

Boost-Build :

Subject: Re: [Boost-build] Using pre-built shared libraries with unit-test
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-01-27 04:00:36

Steven Watanabe wrote:
> Johan Nilsson wrote:
>> when using shared library targets as a dependency to a unit-test
>> target, their path(s) are automatically set in the environment before
>> actually running the unit-test target (under Windows, at least).
>> <snip>
>> # NOTE: These library definitions actually refer to "import"
>> libraries. Dlls are located in the same directory.
>> lib foo
>> :
>> : <file>$(ROOT)/deps/lib/foo-mt-gd.lib <link>shared <variant>debug
>> <toolset>msvc
>> ;
>> However, the path of the "foo" library doesn't seem to be used by the
>> unit test. Is there a simple way to have unit-test set up the
>> additional path component before running the "bar" unit-test?
> You'll want to add the search directory to the usage requirements.
> lib foo
> :
> : <file>...
> :
> : <dll-path>$(ROOT)/deps/lib
> ;

Easy as that ... thanks!

Reading the documentation, however, it is stated that dll-path only affects
unix compilers. If emphasizing "compilers", this might be correct as the
windows compilers/linkers don't use the information, but it obviously
affects at least the unit-test rule under the windows platform. Perhaps some
clarification in the docs would be in order - should I add a ticket for

Also, I'm a bit worried how this will affect the unix builds/installs of my
application. Need to do some testing I guess.

Regards / Johan

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at