c++ - 从 Windows building .o 但不是 .a 交叉编译 Boost for GCC ARM (Linux)

标签 c++ linux boost arm cross-compiling

我正在 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/

相关文章:

c++ - std::transform() 和 toupper(),没有匹配的函数

c++ - 基于返回类型的函数模板推导?

c++ - 启用/禁用用于编译的特定功能标志

c - 为什么父进程死亡会杀死子进程

linux - 等待 bash 启动的进程结束并获取其 PID

c++ - boost asio取消读取而不取消写入

c++ - GTKMM 和 boost.asio

c++ - std::vector - 游戏循环期间的优化

c++ - 加载共享库时出错 : libboost_iostreams. so.1.59.0: 无法打开共享对象文件: 没有这样的文件或目录

c++ - Boost buffer_cast无法从void *转换为PointerToPodType