锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 开源技术 / C语言开源 / boost用gcc编译不能指定其它版本gcc
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

boost用gcc编译不能指定其它版本gcc


I'm trying to build boost on CentOS 5.5 using the /usr/bin/gcc44 compiler and I'm running into difficulties with documentation not
fitting reality. How do I make this work?
我正在尝试使用/ usr / bin / gcc44 编译器在CentOS 5.5上构建增强功能, 并且遇到文档不符合实际的问题。我该如何工作?

What I've tried...我尝试过的操作...

Note: I've removed /usr/bin/gcc and /usr/bin/g++ to force errors when gcc44 and g++44 are not used.
注意:当不使用gcc44和g ++ 44时,我删除了/ usr / bin / gcc和/ usr / bin / g ++来强制出错 
Using ./bootstrap.sh Building Boost.Jam with toolset ... tools/jam/src/###
### No toolset specified. Please use --toolset option.
使用./bootstrap.sh
使用工具集构建Boost.Jam ... tools / jam / src / ###
###未指定工具集。请使用--toolset选项。
Setting CC=/usr/bin/gcc44 and CXX=/usr/bin/g++44 (note that this won't work if gcc and g++ exist because then it will default to the gcc
toolkit and not the gcc-4.4 toolkit that I want). This builds a number of things (looking at the bootstrap.log) but still gives the following
error. Ignoring the error and calling ./bjam then fails.
Building Boost.Jam with toolset ... tools/jam/src/###
### No toolset specified. Please use --toolset option.
设置CC = / usr / bin / gcc44和CXX = / usr / bin / g ++ 44(请注意如果存在gcc和g ++ ,这将 不起作用,因为它将默认使用gcc工具包而不是gcc-4.4工具包我想要的)。这编译出来了一些东西(查看bootstrap.log),但仍然出现以下错误。忽略错误,然后调用./bjam失败。
使用工具集构建Boost.Jam ... tools / jam / src / ###
###未指定工具集。请使用--toolset选项。
Using ./bootstrap.sh --toolset=gcc gives an error:
   unrecognized option: --toolset=gcc
使用./bootstrap.sh --toolset = gcc会给出错误:
   无法识别的选项:--toolset = gcc
Using ./bootstrap.sh --with-toolset=gcc gives an error:
Building Boost.Jam with toolset gcc...
Failed to build Boost.Jam
-> bootstrap.log shows that it is trying to build with gcc, which
doesn't exist, therefore error.
使用./bootstrap.sh --with-toolset = gcc会出错:
使用工具集gcc构建Boost.Jam ...
无法构建Boost.Jam-
> bootstrap.log表明它正在尝试使用gcc进行构建,而gcc不存在,因此出错。
Using ./bootstrap.sh --with-toolset=gcc-4.4 gives an error:
Building Boost.Jam with toolset gcc...
Failed to build Boost.Jam
-> bootstrap.log shows ### Unknown toolset: gcc-4.4
使用./bootstrap.sh --with-toolset = gcc-4.4会给出错误:
使用工具集gcc
构建Boost.Jam ... 无法构建Boost.Jam
-> bootstrap.log显示###未知工具集:gcc-4.4
Creating ~/user-config.jam as:
  import toolset.using ;
  using gcc : 4.4 : g++44 ;
创建〜/ user-config.jam为:
  import toolset.using;
  使用gcc:4.4:g ++ 44;
export BOOST_USER_CONFIG=~/user-config.jam
Then calling the same ./bootstrap.sh command lines above show no difference.
How in the world do I get this thing to use /usr/bin/gcc44 and /usr/bin/g++44 to compile?
I think that I'm going to have to create local links ./gcc -> /usr/bin/gcc44 and add the current directory to the path just to get
this to build the way that I want it to. This seems crazy.

然后调用上面相同的./bootstrap.sh命令行显示没有区别。
我到底如何使用/ usr / bin / gcc44和 / usr / bin / g ++ 44进行编译?
我认为我将必须创建本地链接./gcc-> / usr / bin / gcc44并将当前目录添加到路径中,以使其按照我的方式构建。好像疯了

I'll simplify the question in order to try again for help.

I have found that the only way I can force boost 1.44.0 to build on linux using a version of gcc installed as /usr/bin/gcc44 is to create
a symlink of gcc -> /usr/bin/gcc44 on the path. This can't be right.

Can anyone tell me how to specify an alternate compiler? See below for the methods (from the documentation) that I have tried and found to
not work.

我将简化问题,以便再次尝试获得帮助。

我发现,我可以使用安装为/ usr / bin / gcc44的gcc版本来强制boost 1.44.0在linux上构建的唯一方法 是
在路径上创建 gcc的符号链接-> / usr / bin / gcc44。这是不对的。

谁能告诉我如何指定替代编译器?请参阅以下有关方法来自文档),但我尝试过并发现无法使用  。

Part of the problem seems to be misleading / incorrect error messages:
>> ### No toolset specified. Please use --toolset option.
seems to be an error message from bjam, but I think "--toolset" should instead be "toolset".  I don't know anything about ./bootstrap.sh though.
I use something like
  bjam toolset=gcc ... lots of other options ...
with a user-config.jam file containing something like
    using gcc :  :  /usr/local/bin/mygcc  :  <cxxflags>="..."  ;

谁能告诉我如何指定替代编译器?请参阅下面的
>我尝试过并发现无法使用的方法(来自文档) 。
问题的一部分似乎是令人误解的/错误的错误消息:
>> ###未指定工具集。请使用--toolset选项。
似乎是来自bjam的错误消息,但我认为“ --toolset”应改为“ toolset”。我对./bootstrap.sh一无所知。
我使用
  bjam toolset = gcc之类的东西 ...还有很多其他选项...
带有一个user-config.jam文件,其中包含
    使用gcc之类的东西 ::/ usr / local / bin / mygcc:<cxxflags> =“ ... “;

The file user-config.jam allow to you set a multiple gcc config.
1. copy tools/build/v2/user-config.jam into your $HOME directory
2. and set gcc 4.4 option
# Configure specific gcc version, giving alternative name to use.
using gcc : 4.4 : g++44 ;

3. run
./bootstrap.sh
from boost root directory

4. run bjam with toolset option and your options like:
 ./bjam  toolset=gcc-4.4

文件user-config.jam允许您设置多个gcc配置。
1.将tools / build / v2 / user-config.jam复制到$ HOME目录中
2.并设置gcc 4.4选项
#配置特定的gcc版本,并提供备用名称。
使用gcc:4.4:g ++ 44;

3.从boost根目录 运行
./bootstrap.sh 

4.使用toolset选项和您的选项运行bjam,如:  ./bjam toolset = gcc-4.4

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内