当前位置:  开发笔记 > 编程语言 > 正文

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

如何解决《使用VisualStudio2010在Vista上安装boost1.42(或任何其他版本)》经验,为你挑选了1个好方法。

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

首先从官方网站下载升级1.42并解压缩到c:\ boost_1_42_0然后我调用了bootstrap.bat但是我得到了一些错误:

c:\boost_1_42_0>bootstrap.bat
Building Boost.Jam build engine

Failed 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=72941

Also, you can file an issue at http://svn.boost.org
Please 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 bootstrap

c:\boost_1_42_0\tools\jam\src>md bootstrap

c:\boost_1_42_0\tools\jam\src>cl /nologo /RTC1 /Zi /MTd /Fobootstrap/
/Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib
user32.lib /Febootstrap\jam0  command.c compile.c debug.c execnt.c
expand.c filent.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c
jamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.c
pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c
variable.c modules.c strings.c filesys.c builtins.c pwd.c class.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
command.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
compile.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
debug.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
execnt.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
expand.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
filent.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
glob.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
hash.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
hdrmacro.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
headers.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
jam.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
jambase.c
jamgram.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
lists.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
make.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
make1.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
newstr.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
option.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
output.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
parse.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
Generating Code...
Compiling...
pathunix.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
regexp.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
rules.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
scan.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
search.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
subst.c
subst.c(1) : fatal error C1034: stddef.h: no include path set
timestamp.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
variable.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
modules.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
strings.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
filesys.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
builtins.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
pwd.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
class.c
c:\boost_1_42_0\tools\jam\src\strings.h(8) : fatal error C1034:
stddef.h: no include path set
w32_getreg.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
native.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
set.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
path.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
regex.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
property-set.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
Generating Code...
Compiling...
sequence.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
order.c
c:\boost_1_42_0\tools\jam\src\jam.h(88) : fatal error C1034: fcntl.h:
no include path set
Generating Code...

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

然后我调用了

c:\ boost_1_42_0> bjam --toolset = msvc --build-type =完成阶段

但我得到很多错误:

    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >n
ul
cl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-l
ink-static\token_ids.obj.rsp"

...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runti
me-link-static\token_ids.obj...
compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-st
atic\wave_config_constant.obj
wave_config_constant.cpp
libs\wave\src\wave_config_constant.cpp(17) : fatal error C1083: Cannot open incl
ude file: 'cstring': No such file or directory

    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >n
ul
cl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-l
ink-static\wave_config_constant.obj.rsp"

...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runti
me-link-static\wave_config_constant.obj...
common.mkdir bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-sta
tic\cpplexer
common.mkdir bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-sta
tic\cpplexer\re2clex
compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-st
atic\cpplexer\re2clex\aq.obj
aq.cpp
libs\wave\src\cpplexer\re2clex\aq.cpp(16) : fatal error C1083: Cannot open inclu
de file: 'cstdlib': No such file or directory

    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >n
ul
cl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-l
ink-static\cpplexer\re2clex\aq.obj.rsp"

...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runti
me-link-static\cpplexer\re2clex\aq.obj...
compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-link-st
atic\cpplexer\re2clex\cpp_re.obj
cpp_re.cpp
libs\wave\src\cpplexer\re2clex\cpp_re.cpp(20) : fatal error C1083: Cannot open i
nclude file: 'ctime': No such file or directory

    call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >n
ul
cl /Zm800 -nologo @"bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runtime-l
ink-static\cpplexer\re2clex\cpp_re.obj.rsp"

...failed compile-c-c++ bin.v2\libs\wave\build\msvc-10.0\debug\link-static\runti
me-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 lib
boost_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 libb
oost_regex-vc100-sgd-1_42.lib...
...skipped libboost_graph-vc100-sgd.lib for lack of libb
oost_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 l
ibboost_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 l
ibboost_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 lib
boost_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 li
bboost_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 libbo
ost_wave-vc100-sgd-1_42.lib...
...failed updating 1176 targets...
...skipped 1629 targets...
...updated 276 targets...

你能帮助我吗?



1> rubenvb..:

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

与Unix-ish操作系统不同,Windows喜欢保持系统PATH清洁.Visual Studio在名为"Visual Studio CMD"的开始菜单中添加了一个条目,该条目为您设置了所有内容.

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

推荐阅读
有风吹过best
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有