gpt4 book ai didi

c++ - 使用 Visual Studio 2010 在 Vista 上安装 boost 1.42(或任何其他版本)

转载 作者:行者123 更新时间:2023-11-30 01:31:19 24 4
gpt4 key购买 nike

我想在装有 Vista 和 Visual Studio 2010 的 PC 上安装 boost 库。

首先从官网下载boost 1.42,解压到c:\boost_1_42_0然后我调用了 bootstrap.bat,但出现了一些错误:

c:\boost_1_42_0>bootstrap.batBuilding Boost.Jam build engineFailed to build Boost.Jam build engine.Please consult bjam.log for furter diagnostics.You can try to obtain a prebuilt binary from   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941Also, you can file an issue at http://svn.boost.orgPlease attach bjam.log in that case.

在 bjam.log 中我发现:

Setting environment for using Microsoft Visual Studio 2010 x86 tools.ERROR: Cannot determine the location of the VS Common Tools folder.###### Using 'vc10' toolset.###c:\boost_1_42_0\tools\jam\src>if exist bootstrap rd /S /Q bootstrapc:\boost_1_42_0\tools\jam\src>md bootstrapc:\boost_1_42_0\tools\jam\src>cl /nologo /RTC1 /Zi /MTd /Fobootstrap//Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.libuser32.lib /Febootstrap\jam0  command.c compile.c debug.c execnt.cexpand.c filent.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.cjamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.cpathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.cvariable.c modules.c strings.c filesys.c builtins.c pwd.c class.cw32_getreg.c native.c modules/set.c modules/path.c modules/regex.cmodules/property-set.c modules/sequence.c modules/order.ccommand.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setcompile.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setdebug.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setexecnt.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setexpand.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setfilent.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setglob.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path sethash.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path sethdrmacro.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setheaders.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setjam.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setjambase.cjamgram.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setlists.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setmake.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setmake1.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setnewstr.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setoption.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setoutput.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setparse.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setGenerating Code...Compiling...pathunix.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setregexp.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setrules.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setscan.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setsearch.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setsubst.csubst.c(1) : fatal error C1034: stddef.h: no include path settimestamp.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setvariable.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setmodules.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setstrings.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setfilesys.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setbuiltins.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setpwd.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setclass.cc:\boost_1_42_0\tools\jam\src\strings.h(8) : fatal error C1034:stddef.h: no include path setw32_getreg.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setnative.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setset.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setpath.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setregex.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setproperty-set.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setGenerating Code...Compiling...sequence.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setorder.cc:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:no include path setGenerating Code...

所以我决定下载 bjam 二进制文件,并将其保存到 c:\boost_1_42_0

然后我调用了

c:\boost_1_42_0>bjam --toolset=msvc --build-type=complete stage

但是我得到了很多错误:

    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nulcl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\token_ids.obj.rsp"...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\token_ids.obj...compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\wave_config_constant.objwave_config_constant.cpplibs\wave\src\wave_config_constant.cpp(17) : fatal error C1083: Cannot open include file: 'cstring': No such file or directory    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nulcl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\wave_config_constant.obj.rsp"...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\wave_config_constant.obj...common.mkdir bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexercommon.mkdir bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clexcompile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clex\aq.objaq.cpplibs\wave\src\cpplexer\re2clex\aq.cpp(16) : fatal error C1083: Cannot open include file: 'cstdlib': No such file or directory    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nulcl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clex\aq.obj.rsp"...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clex\aq.obj...compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clex\cpp_re.objcpp_re.cpplibs\wave\src\cpplexer\re2clex\cpp_re.cpp(20) : fatal error C1083: Cannot open include file: 'ctime': No such file or directory    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nulcl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clex\cpp_re.obj.rsp"...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-static\cpplexer\re2clex\cpp_re.obj......skipped libboost_wave-vc100-sgd-1_42.lib for lack of instantiate_cpp_exprgrammar.obj......skipped libboost_wave-vc100-sgd-1_42.lib for lack of libboost_wave-vc100-sgd-1_42.lib......skipped libboost_date_time-vc100-sgd.lib for lack of libboost_date_time-vc100-sgd-1_42.lib......skipped libboost_system-vc100-sgd.lib for lack of libboost_system-vc100-sgd-1_42.lib......skipped libboost_filesystem-vc100-sgd.lib for lack of libboost_filesystem-vc100-sgd-1_42.lib......skipped libboost_regex-vc100-sgd.lib for lack of libboost_regex-vc100-sgd-1_42.lib......skipped libboost_graph-vc100-sgd.lib for lack of libboost_graph-vc100-sgd-1_42.lib......skipped libboost_iostreams-vc100-sgd.lib for lack of libboost_iostreams-vc100-sgd-1_42.lib......skipped libboost_math_tr1-vc100-sgd.lib for lack of libboost_math_tr1-vc100-sgd-1_42.lib......skipped libboost_math_tr1f-vc100-sgd.lib for lack of libboost_math_tr1f-vc100-sgd-1_42.lib......skipped libboost_math_tr1l-vc100-sgd.lib for lack of libboost_math_tr1l-vc100-sgd-1_42.lib......skipped libboost_math_c99-vc100-sgd.lib for lack of libboost_math_c99-vc100-sgd-1_42.lib......skipped libboost_math_c99f-vc100-sgd.lib for lack of libboost_math_c99f-vc100-sgd-1_42.lib......skipped libboost_math_c99l-vc100-sgd.lib for lack of libboost_math_c99l-vc100-sgd-1_42.lib......skipped libboost_program_options-vc100-sgd.lib for lack of libboost_program_options-vc100-sgd-1_42.lib......skipped libboost_python-vc100-sgd.lib for lack of libboost_python-vc100-sgd-1_42.lib......skipped libboost_serialization-vc100-sgd.lib for lack of libboost_serialization-vc100-sgd-1_42.lib......skipped libboost_wserialization-vc100-sgd.lib for lack of libboost_wserialization-vc100-sgd-1_42.lib......skipped libboost_signals-vc100-sgd.lib for lack of libboost_signals-vc100-sgd-1_42.lib......skipped libboost_prg_exec_monitor-vc100-sgd.lib for lack of libboost_prg_exec_monitor-vc100-sgd-1_42.lib......skipped libboost_test_exec_monitor-vc100-sgd.lib for lack of libboost_test_exec_monitor-vc100-sgd-1_42.lib......skipped libboost_unit_test_framework-vc100-sgd.lib for lack of libboost_unit_test_framework-vc100-sgd-1_42.lib......skipped libboost_wave-vc100-sgd.lib for lack of libboost_wave-vc100-sgd-1_42.lib......failed updating 1176 targets......skipped 1629 targets......updated 276 targets...

你能帮帮我吗?

最佳答案

我相信您看到的错误是因为您的环境(PATH...)设置不正确。

与 Unix-ish 操作系统不同,Windows 喜欢保持系统 PATH 干净。 Visual Studio 在开始菜单中添加了一个名为“Visual Studio CMD”的条目,它会为您设置所有内容。

您应该使用此命令提示符,然后cd 到boost 源代码的位置,然后运行bootstrap.bat。

关于c++ - 使用 Visual Studio 2010 在 Vista 上安装 boost 1.42(或任何其他版本),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3307488/

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