Subject: Re: [Boost-build] Telling the location of library files when using a different partition to modular-boost
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-03-22 13:07:02
> -----Original Message-----
> From: Steven Watanabe [mailto:watanabesj_at_[hidden]]
> Sent: 21 March 2016 17:31
> To: Boost.Build developer's and user's list
> Subject: Re: [Boost-build] Telling the location of library files when using a different partition to modular-boost
> On 03/21/2016 07:14 AM, Paul A. Bristow wrote:
> >> -----Original Message-----
> >> From: Steven Watanabe [mailto:watanabesj_at_[hidden]]
> >> On 03/17/2016 11:55 AM, Paul A. Bristow wrote:
> >>> My libraries are in the 'standard' I:/modular-boost/stage/lib location
> >>> but b2 is looking in the wrong place?
> >>> error: Unable to find file or target named
> >>> error: '/boost/thread//boost_chrono'
> >>> error: referred to from project at
> >>> error: '.'
> >>> error: could not resolve project reference '/boost/thread'
> >>> How do I tell the jamfile where the library files reside ?
> >> use-project /boost : I:/modular-boost ;
> >> This can go in user-config.jam, project-config.jam,
> >> or your project's jamfile.
> > Looks promising but doesn't quite work
> What /exactly/ did you try? Do you get
> the same error or a different error?
I've tried a lot of combinations and I now have a simpler example using just Boost.System
based on \modular-boost\libs\system\test\config_test.cpp
and this example runs OK using the VS IDE
1> Linking to lib file: libboost_system-vc140-mt-gd-1_60.lib
1> boost_hello_system.vcxproj -> J:\Cpp\Misc\Debug\boost_hello_system.exe
1> Hello Boost!
1> Platform: Win32
1> Compiler: Microsoft Visual C++ version 14.0
1> STL : Dinkumware standard library version 650
1> Boost : 1.60.0
1> _MSC_FULL_VER = 190023725
1> BOOST_WINDOWS_API is defined
1> _MSC_VER is defined as 1900
in my jamfile I have
using use-project /boost : i:/modular-boost ;
run hello_boost_system.cpp ;
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc140-mt-sgd-1_60.lib'
but this file *does exist*:
If I change to this run line (and remove the <library> )
run hello_boost_system.cpp /boost/system//boost_system ;
I get the same link error.
(Wondering if an absolute path was not allowed, if I try to create a relative path then I get this
I:/modular-boost/tools/build/src/build\project.jam:262: in find-jamfile from module project
error: Unable to load Jamfile.
error: Could not find a Jamfile in directory '../../../../i:/modular-boost'.
error: Attempted to find it with pattern '[Bb]uild.jam [Jj]amfile.v2 [Jj]amfile [Jj]amfile.jam'.
But if I add
as well as
then it all builds and passes, as does
run hello_boost_system.cpp /boost/system//boost_system /boost/thread//boost_thread ;.
So I there is something I don't understand about library requirements for Boost.System and Boost.Chrono,
but was misled by the failure to link (and that I still don't understand why).
But your original suggestions looks correct.
I'll try further using Boost.Test.
Thanks, as usual.
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