所以我在这里结束我的线路;我正在研究保存文件和序列化,只是为了了解C++不具备Python与其精彩的pickle
一样的本地序列化能力。但幸运的是,它具有Boost功能 - 所以开始我的任务,在我的系统上安装Boost 1.47,以便能够序列化我的对象。如何使用CodeBlocks安装Boost库?
到目前为止,虽然没有成功。我第一次以为我可以使用这个: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,我得到以下错误:
Failed to build Boost.Build engine. Please consult bootstrap.log for further diagnostics.
咦 - 嗯,无处有任何形式的.log文件,但有一个名为引导一个文本文件,它包含以下内容:
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,但说实话,我还没有学到很多关于编程技术的更多方面,所以我可能会误解这一点。 – GarrickW