|
Boost-Build : |
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
>
> AMDG
>
> 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> hello_boost_system.cpp
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> (x86)
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 ;
requirement
<library>/boost/system//boost_system
and
run hello_boost_system.cpp ;
I get
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc140-mt-sgd-1_60.lib'
but this file *does exist*:
I:\modular-boost\stage\lib\libboost_system-vc140-mt-sgd-1_60.lib
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
<library>/boost/thread//boost_thread
as well as
<library>/boost/system//boost_system
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.
Paul
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