Windows上针对ARM的交叉编译Boost

时间:2019-03-06 17:35:36

标签: boost cross-compiling

我正在Windows 10上的Intel的MINGW shell内为ARM构建Boost。

我已经运行./bootstrap并使用using gcc : arm : arm-linux-gnueabihf-g++ ;配置了project-config.jam,但是当我运行时

./b2 --build-dir=/tmp toolset=gcc-arm stage

我遇到此错误:

User@UserLaptop MINGW64 /c/my/Work/SoftwareTest/boost_1_61_0
$ ./bjam install toolset=gcc-arm --prefix=./lib
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/tools/gcc.jam:84: in gcc.init from module gcc
error: toolset gcc initialization:
error: provided command 'arm-linux-gnueabihf-g++' not found
error: initialized from project-config.jam:12
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/build/toolset.jam:43: in toolset.using from module toolset
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/build/project.jam:1052: in using from module project-rules
project-config.jam:12: in modules.load from module project-config
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/build-system.jam:249: in load-config from module build-system
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/build-system.jam:412: in load-configuration-files from module build-system
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/build-system.jam:524: in load from module build-system
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/kernel/modules.jam:295: in import from module modules
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/cygdrive/c/my/Work/SoftwareTest/boost_1_61_0/boost-build.jam:17: in module scope from module

但是可以在$ PATH中找到arm-linux-gnueabihf-g ++:

User@UserLaptop MINGW64 /c/my/Work/SoftwareTest/boost_1_61_0
$ which arm-linux-gnueabihf-g++
/c/intelfpga/18.1/embedded/ds-5/sw/gcc/bin/arm-linux-gnueabihf-g++

1 个答案:

答案 0 :(得分:0)

由于它是Windows中的project-config.jam gcc,应使用扩展名arm-linux-gnueabihf-g ++ .exe 而不是arm-linux-gnueabihf-g ++来指定。