Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost.Dll Compile error with VxWorks, but not Linux?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-10-02 03:26:44


AMDG

On 10/01/2018 09:13 PM, Kuhl, Brian via Boost-build wrote:
> Hi Experts,
> I'm able to run the Dll tests with <link>static on Linux,
>> cd status
>> ../b2 <link>static -limit-tests="dll"
> But when I'm cross compiling for VxWorks I get compile errors in the dependent filesystem library.
> I can solve this by adding an explicit <link>shared to the test .. e.g.
>
>>From dll/build/Jamefile.v2
> [ run cpp_import_test.cpp : : cpp_plugin : <target-os>vxworks:<link>shared ]
>
> But I'm wondering why?
> How did both conditions in filesystem get defined i.e :
>
>>From filesystem/build/Jamefile.v2
> : usage-requirements # pass these requirement to dependents (i.e. users)
> <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
> <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
>

I suspect that you've managed to link to both static filesystem
and dynamic filesystem, but I'm unsure of the exact reason.
To verify this theory, run with -n and check the link command(s).

> ....................................
>
> clang-vxworks.compile.c++ ../bin.v2/libs/dll/test/cpp_import_class_test.test/clang-vxworks/debug/cross-compile-vxworks/link-static/cpp_import_class_test.o
> In file included from ../libs/dll/test/cpp_import_class_test.cpp:14:
> In file included from ../libs/dll/test/../example/b2_workarounds.hpp:11:
> In file included from /yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/boost/filesystem.hpp:15:
> /yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/boost/filesystem/config.hpp:70:3: error: Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
> # error Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
> ^
>

In Christ,
Steven Watanabe


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