简体   繁体   English

如何使用mingw从命令行构建boost 1.55?

[英]How do I build boost 1.55 from the command line with mingw?

Note: I have seen this SO question, but I do not think the question is clear and the solutions do not cover the issue I have run into. 注意:我已经看到了这样的问题,但是我认为问题并不明确,解决方案也无法解决我遇到的问题。

I downloaded boost 1.55 from sourceforge and unzipped it to C:\\My Programs\\ directory. 我从sourceforge下载boost 1.55,并将其解压缩到C:\\ My Programs \\目录。 When I tried to run the bootstrap.bat file ( REF ) I got the error: 当我尝试运行bootstrap.bat文件( REF )时,出现错误:

C:\Users\pollexb\git_repositories\modular-boost>bootstrap.bat 
Building Boost.Build engine 
'"VCVARS32.BAT"' is not recognized as an internal or external command 
operable program or batch file. 
'"VCVARS32.BAT"' is not recognized as an internal or external command 
operable program or batch file. 
'"VCVARS32.BAT"' is not recognized as an internal or external command 
operable program or batch file. 
'"VCVARS32.BAT"' is not recognized as an internal or external command 
operable program or batch file. 
'cl' is not recognized as an internal or external command, 
operable program or batch file. 

Failed to build Boost.Build engine. 
Please consult bootstrap.log for furter diagnostics. 

You can try to obtain a prebuilt binary from 

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941 

Also, you can file an issue at http://svn.boost.org 
Please attach bootstrap.log in that case. 

What is the problem & how do I solve it? 有什么问题,我该如何解决?

Boost 1.55 seems to have an issue with bootstrap.bat working ( REF ). Boost 1.55似乎与bootstrap.bat的工作有关( REF )。 The easiest solution would be to download & install Boost 1.54 . 最简单的解决方案是下载并安装Boost 1.54

I'm answering this question 2 years later because I had the same issue with boost 1.60. 两年后,我要回答这个问题,因为我对Boost 1.60遇到了同样的问题。

It looks like you don't have Visual Studio installed. 好像您没有安装Visual Studio。 Apparently bootstrap.bat assumes you have that as default, otherwise you should indicate the compiler toolchain you want to use. 显然bootstrap.bat假定您具有默认设置,否则应指出要使用的编译器工具链。 As an example I had to enter "boostrap.bat mingw ". 例如,我必须输入“ boostrap.bat mingw ”。

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

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