【发布时间】:2014-12-15 17:29:47
【问题描述】:
所以我快到了我的行尾了;我一直在研究保存文件和序列化,只是发现 C++ 没有 Python 具有的那种原生序列化能力,其出色的 pickle。但幸运的是,它有 Boost - 所以我开始寻求在我的系统上安装 Boost 1.47,以便能够序列化我的对象。
不过,到目前为止,还没有成功。我一开始以为我可以使用这个: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。但这也不起作用。运行 \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!
【问题讨论】:
-
您使用的是什么工具集(编译器)?
-
对不起!如果我没记错的话,我正在使用 MinGW,但老实说,我还没有学到很多关于编程技术方面的知识,所以我可能会误解这一点。
标签: c++ boost codeblocks