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

 

Many Thanks,

 

Brian Kuhl

 

 

………………………………

 

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 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:16:

In file included from /yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/boost/filesystem/path.hpp:25:

In file included from /yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/boost/filesystem/path_traits.hpp:23:

In file included from /yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/boost/system/error_code.hpp:15:

/yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/boost/system/config.hpp:34:3: error: Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK

# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK

  ^

….

34 warnings and 2 errors generated.

    "/yow-build62-lx2/bkuhl/vx7/compilers/llvm-6.0.0.2/LINUX386/bin/clang" -x c++ --target=x86_64 -m64 -mcmodel=large -fno-omit-frame-pointer -mno-red-zone -fno-strict-aliasing -mno-implicit-float -fno-builtin -nostdlibinc -nostdinc++ -ftls-model=local-exec -ansi -std=c++14 -O2 -Wall -Wconversion -Wno-sign-conversion -Wreturn-type -Wconversion -Wformat -Wno-sign-conversion -Wno-missing-braces -Wno-c++11-narrowing -O3 -finline-functions -Wno-inline -Wall -g -Wno-inline  -include/yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0/autoconf_vsbConfig_quote.h -D_C99 -D_HAS_C9X -D__vxworks -D__VXWORKS__ -D__RTP__ -D__ELF__ -D_USE_INIT_ARRAY -D__WRS_NO_DIRECT_TLS_ACCESS_FROM_RTP_TO_SHARED_LIB -I/yow-build62-lx2/bkuhl/work/VSB/3pp/BOOST/boost_1_68_0 @/yow-build62-lx2/bkuhl/work/VSB/mk/_vsbuinc_cmdllvmBOOST -D_VX_CPU=_VX_SIMLINUX -D_VX_TOOL_FAMILY=llvm -D_VX_TOOL=llvm -D_nq_VSB_CONFIG_FILE=/yow-build62-lx2/bkuhl/work/VSB/h/config/vsbConfig.h -I/yow-build62-lx2/bkuhl/work/VSB/share/h -isystem/yow-build62-lx2/bkuhl/work/VSB/usr/h -isystem/yow-build62-lx2/bkuhl/work/VSB/usr/h/system -isystem/yow-build62-lx2/bkuhl/work/VSB/usr/h/public -D_VSB_PUBLIC_HDR_DIR=/yow-build62-lx2/bkuhl/work/VSB/usr/h/public -I. -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -I".." -c -o "../bin.v2/libs/dll/test/cpp_import_class_test.test/clang-vxworks/debug/cross-compile-vxworks/link-static/cpp_import_class_test.o" "../libs/dll/test/cpp_import_class_test.cpp"

...failed 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...