Re: Boost.Dll Compile error with VxWorks, but not Linux?
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.
> [ 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 :
> : usage-requirements # pass these requirement to dependents (i.e. users)
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