Re: How to add to PATH from user-config.jam?
Mateusz Loskot via Boost-build <[email protected]> Tue, 17 Dec 2019 12:14:05 +0100
| Newsgroups | gmane.comp.lib.boost.build |
|---|---|
| Message-ID | <CABUeae8x7p3kkLbSfTP+yYKYzntJX4MSqXNYKvaDk9_ZLmz7xg@mail.gmail.com> |
On Mon, 16 Dec 2019 at 22:35, Mateusz Loskot <[email protected]> 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! ;) Next, I'd like to make this work for request of both at the same time, that is address-model=32,64 or address-model=64,32 Interestingly, both first target in the list succeeds and the second fails with linking errors due to mismatch of machine type of libraries and build target. That is, unresolved external symbol errors are described as follows - for address-model=32,64 warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64' - for address-model=64,32 warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86' For both address models, checks of libraries succeed with yes. Is there any way to make the multi-model command work? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build