简体   繁体   English

Windows编译.o但不编译.a的Boost for GCC ARM(Linux)的交叉编译。

[英]Cross-Compile of Boost for GCC ARM (Linux) from Windows building .o but not .a

I'm cross-compiling Boost for a Linux distro on an ARM board. 我正在ARM板上交叉编译Linux发行版的Boost。 I'm using windows with Boost 1.47. 我正在使用带有Boost 1.47的Windows。

My project-config.jam contains the following: 我的project-config.jam包含以下内容:

 import option ; using gcc : arm : "C:/Program Files (x86)/CodeSourcery/Sourcery 

G++ Lite/bin/arm-none-linux-gnueabi-g++" ; G ++ Lite / bin / arm-none-linux-gnueabi-g ++“;

 option.set keep-going : false ; 

And I'm building with the command: 我正在使用以下命令进行构建:

bjam toolset=gcc-arm target-os=linux bjam toolset = gcc-arm target-os = linux

Whilst .o objects are building just fine, .a builds are failing usually with something like: 虽然.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" “ 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... ...失败的gcc.archive bin.v2 \\ libs \\ wave \\ build \\ gcc-arm \\ release \\ link-static \\ target- os-linux \\ threading-multi \\ libboost_wave-gcc-mt-1_47.a ...。 ..由于缺少libboost_wav e-gcc-mt-1_47.a而跳过了libboost_wave-gcc-mt-1_47.a ... ...未能更新23个目标... ...跳过了28个目标... ...更新了641个目标...

I am also getting quote a few of the following error messages: 我还引用了以下一些错误消息:

'"C:\\Program Files (x86)\\CodeSourcery\\Sourcery G++ Lite\\bin"' is not recognized as an internal or external command, operable program or batch file. 无法将““ C:\\ Program Files(x86)\\ CodeSourcery \\ Sourcery G ++ Lite \\ bin”识别为内部或外部命令,可操作程序或批处理文件。

Any ideas guys? 有什么想法吗?

Many thanks 非常感谢

I just have: 我只有:

import option ; 

using gcc : arm : arm-none-linux-gnueabi-g++.exe ; 

option.set keep-going : false ; 

And the compiler in the path. 并在路径中编译。 Works for me. 适合我。 Perhaps '\\' vs '/' in your case. 在您的情况下,可能是“ \\”还是“ /”。

http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html

EDIT: To add the 编辑:添加

C:\\Program Files (x86)\\CodeSourcery\\Sourcery G++ Lite\\bin C:\\ Program Files(x86)\\ CodeSourcery \\ Sourcery G ++ Lite \\ bin

directory to your path follow the instructions here: 路径目录,请按照此处的说明进行操作:

http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

Faced the same problem, it was caused by the spaces within the path which aren't properly handled by boost.build. 面对相同的问题,这是由boost.build无法正确处理路径中的空格引起的。 Either switch to boost 1.48.0, or move CS into a path without spaces. 切换到Boost 1.48.0,或将CS移到没有空格的路径中。

C:\\ Program Files(x86)\\ CodeSourcery \\ Sourcery G ++ Lite \\ bin的错误听起来像缺少编译器名称的变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM