1 Reply Latest reply on Sep 23, 2015 1:35 PM by CMata_Intel

    Boost C++ cross-compilation on Windows


      Hi everyone,

      We need to set up environment to cross-compile our project on Windows.

      There are several third-party dependencies - Boost, Avro C++ and Botan.

      But while building Boost the compiler from Cross-compile Tools crashes each time.

      Have someone faced with similar problem?


      I have made the following steps to cross-compile Boost:


      1. Download SDK - Cross compile tools there.

      2. Unzip it.

      3. Add the directory with compilers to the PATH variable. (<sdk_home>\sysroots\x86_64-pokysdk-mingw32\usr\bin\i586-poky-linux)

      4. Set the system variable SYSROOT_PATH to "<sdk_home>\sysroots\core2-32-poky-linux" to find platform headers and libraries.

      5. To build Boost:

          1) bootstrap.bat

          2) Edit project-config.jam.Enter the following text:


                  import option ;

                  import os ;


                  local SYSROOT_PATH = [ os.environ SYSROOT_PATH ] ;

                  using gcc : : i586-poky-linux-g++.exe : <compileflags>--sysroot=$(SYSROOT_PATH) ;


                  option.set keep-going : false ;


          3) b2.exe install target-os=linux --prefix="%SYSROOT_PATH%\usr"




      Several static Boost libraries were built and put to "%SYSROOT_PATH%\usr".

      But the built process was crashed without any message.