我正在 ARM 板上为 Linux 发行版交叉编译 Boost。我正在使用带有 Boost 1.47 的 Windows。
我的 project-config.jam 包含以下内容:
import option ; using gcc : arm : "C:/Program Files (x86)/CodeSourcery/Sourcery
G++ Lite/bin/arm-none-linux-gnueabi-g++" ;
option.set keep-going : false ;
我正在使用命令进行构建:
bjam toolset=gcc-arm target-os=linux
虽然 .o 对象构建得很好,但 .a 构建通常会失败,例如:
"C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin"
"bin.v2\libs\wav e\build\gcc-arm\release\link-static\target-os-linux\threading-multi\libboost_wav e-gcc-mt-1_47.a"
...failed gcc.archive bin.v2\libs\wave\build\gcc-arm\release\link-static\target- os-linux\threading-multi\libboost_wave-gcc-mt-1_47.a... ...skipped libboost_wave-gcc-mt-1_47.a for lack of libboost_wav e-gcc-mt-1_47.a... ...failed updating 23 targets... ...skipped 28 targets... ...updated 641 targets...
我还收到以下一些错误消息:
'"C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin"' is not recognized as an internal or external command, operable program or batch file.
有什么想法吗?
非常感谢
最佳答案
我只有:
import option ;
using gcc : arm : arm-none-linux-gnueabi-g++.exe ;
option.set keep-going : false ;
以及路径中的编译器。为我工作。在你的情况下可能是 '\' 与 '/'。
http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html
编辑:添加
C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin
按照此处的说明将目录添加到您的路径:
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
关于c++ - 从 Windows building .o 但不是 .a 交叉编译 Boost for GCC ARM (Linux),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7630313/