我的发言即将结束了;我正在研究保存文件和序列化,结果发现 C++ 不具备 Python 所具有的那种原生序列化能力pickle
。但幸运的是,它有 Boost - 所以我开始寻求在我的系统上安装 Boost 1.47,以便能够序列化我的对象。
但到目前为止,还没有成功。我首先想到我可以使用这个:http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef,但我不断遇到版本不匹配的错误,在多次尝试找到与 1.47 兼容的 Boost Jam 后(我只找到了 1.3.19,它似乎是为 1.46 构建的),我看到该页面已经超过一年半了已经过时了。
然后,经过多次搜索,我被指向这里:http://www.boost.org/doc/libs/1_47_0/doc/html/bbv2/installation.html http://www.boost.org/doc/libs/1_47_0/doc/html/bbv2/installation.html。但这也行不通。运行 \bootstrap.bat 时,出现以下错误:
无法构建 Boost.Build 引擎。
请查阅 bootstrap.log 以获取进一步的诊断信息。
嗯 - 好吧,没有任何类型的 .log 文件,但是有一个名为 bootstrap 的文本文件,其中包含以下内容:
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
###
### Using 'vc10' toolset.
###
c:\Program Files (x86)\CodeBlocks\MinGW\downloaded\boost_1_47_0\tools\build\v2\engine>if exist bootstrap rd /S /Q bootstrap
c:\Program Files (x86)\CodeBlocks\MinGW\downloaded\boost_1_47_0\tools\build\v2\engine>md bootstrap
c:\Program Files (x86)\CodeBlocks\MinGW\downloaded\boost_1_47_0\tools\build\v2\engine>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 md5.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
compile.c
debug.c
execnt.c
execnt.c(29) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
expand.c
filent.c
glob.c
hash.c
hdrmacro.c
headers.c
jam.c
jam.c(581) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
jambase.c
jamgram.c
lists.c
make.c
make1.c
newstr.c
option.c
output.c
parse.c
Generating Code...
Compiling...
pathunix.c
pathunix.c(275) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
regexp.c
rules.c
scan.c
search.c
subst.c
timestamp.c
variable.c
modules.c
strings.c
filesys.c
builtins.c
md5.c
pwd.c
class.c
w32_getreg.c
w32_getreg.c(18) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
native.c
set.c
path.c
regex.c
Generating Code...
Compiling...
property-set.c
sequence.c
order.c
Generating Code...
现在,我真的很困惑。我对这一切感到不知所措——我仍在编写横向卷轴游戏,并且只掌握了 C++ 几个月的时间。我不知道我做错了什么。有人能给我提供清晰、完整的分步指南或其他内容吗?我只想将 Boost 安装到我的系统上!
从您发布的错误消息来看,我假设您正在使用某些版本的 Visual Studio。为了从命令行使用其编译器,您需要定义一些环境变量。如果您使用 Visual Studio 命令提示符,则会自动完成此操作。更好的是,您可能想尝试并遵循本教程 http://www.boost.org/doc/libs/1_47_0/more/getting_started/index.html.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)