Boost logo

Boost-Build :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2019-12-17 22:33:58


On Tue, 17 Dec 2019 at 21:02, Edward Diener via Boost-build
<boost-build_at_[hidden]> wrote:
> On 12/17/2019 6:14 AM, Mateusz Loskot via Boost-build wrote:
> > On Mon, 16 Dec 2019 at 22:35, Mateusz Loskot <mateusz_at_[hidden]> wrote:
> >>
> >> On Windows, I'm building tests of Boost.GIL using
> >> dependencies like libpng, libjpeg, etc. installed with vcpkg.
> >>
> >> In my user-config.jam I have entries like this:
> >>
> >> using libjpeg
> >> :
> >> : <include>C:/vcpkg/installed/x86-windows/include
> >> <search>C:/vcpkg/installed/x86-windows/lib
> >> : <address-model>32
> >> ;
> >>
> >> using libjpeg
> >> :
> >> : <include>C:/vcpkg/installed/x64-windows/include
> >> <search>C:/vcpkg/installed/x64-windows/lib
> >> : <address-model>64
> >> ;
> >>
> >>
> >> At build time, everything works fine.
> >>
> >> For run-time, GIL tests need to load DLLs in C:\vcpkg\installed\x86-windows\bin
> >> If I add this location to PATH manually, everything works at run-time fine.
> >>
> >> I'm looking for a way to add that location to PATH from user-config.jam.
> >> Is it possible? How?
> >
> > I approached the problem differently and added this at the top of my
> > user-config.jam
> >
> > project
> > : requirements
> > <address-model>32:<dll-path>C:/vcpkg/installed/x86-windows/bin
> > <address-model>64:<dll-path>C:/vcpkg/installed/x64-windows/bin
> > ;
> >
> >
> > Now all the DLLs of libjpeg, libpng, etc. can be found when I run
> > either of these two:
> >
> > b2.exe toolset=msvc-14.2 address-model=32 libs/gil/test/extension/io//simple
> > b2.exe toolset=msvc-14.2 address-model=64 libs/gil/test/extension/io//simple
> >
> > Spectacular success of mine! ;)
>
> According to the Boost Build docs the dll-path feature only affects Unix
> compilers. Perhaps the docs are incorrect regarding this feature.

I missed that bit in the docs on the dll-path being Unix-only feature.

I am certain the dll-path works with MSVC on Windows,
so the docs must be out of date.

I have reported it showing that dll-path works with MSVC:
https://github.com/boostorg/build/issues/516

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk