所以我在這裏結束我的線路;我正在研究保存文件和序列化,只是爲了瞭解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