gpt4 book ai didi

gcc - 在 Windows 10 上安装 boost

转载 作者:行者123 更新时间:2023-12-04 16:31:02 25 4
gpt4 key购买 nike

我对安装 boost 感到非常沮丧。是的,我确实在网上阅读了大量资料,包括原始( boost )指南和 StackExchange 上的许多类似主题,但没有帮助。长话短说:

  • 我有VS2015(社区版)
  • boost_1_62_0(已下载)
  • minGW(以防万一)

按照通常的建议,我启动了 Developers Command Prompt(以便启动 MS Visual Studio),结果是:

C:\Users\Arnold\Desktop\boost_1_62_0>bootstrap.bat
Building Boost.Build engine
'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 further 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.

基本上,这意味着系统找不到编译器。我尝试在常规根 cmd (".\bootstrap.bat gcc") 中添加“gcc”来运行,但得到了相同的结果。

我的 bootstrap.log 文件是:

###
### Using 'gcc' toolset.
###

C:\Users\Arnold\Desktop\boost_1_62_0\tools\build\src\engine>if exist bootstrap rd /S /Q bootstrap

C:\Users\Arnold\Desktop\boost_1_62_0\tools\build\src\engine>md bootstrap

C:\Users\Arnold\Desktop\boost_1_62_0\tools\build\src\engine>gcc -DNT -o bootstrap\jam0.exe command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c

使用 VS2015 是更好的主意吗?有什么线索吗?

UPD我的 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin 的内容: enter image description here

最佳答案

看起来 Visual Studio 是在没有安装 c++ 的情况下安装的。参见 this question .安装后,您需要确保 cl 在您的路径中,这就是 vcvars32.bat 的作用。

现在您可以根据您的机器和开发需求做出决定。您需要 64 位还是 32 位?仅 header ,还是同时构建?单线程还是多线程?参见 this question一些答案。

完整 64 位构建的示例来自上面的第二个问题(由 kayleeFrye_onDeck 提供):

b2 -j%NUMBER_OF_PROCESSORS% toolset=msvc-14.0 --build-type=complete --libdir=C:\Boost\lib\x64 architecture=x86 address-model=64 install

关于gcc - 在 Windows 10 上安装 boost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40472365/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com