简体   繁体   中英

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. I'm using windows with Boost 1.47.

My project-config.jam contains the following:

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

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

Whilst .o objects are building just fine, .a builds are failing usually with something like:

 "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...

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.

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

EDIT: To add the

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

Faced the same problem, it was caused by the spaces within the path which aren't properly handled by boost.build. Either switch to boost 1.48.0, or move CS into a path without spaces.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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