最近在编译POCO库和BOOST库
先讲一下编译POCO库,我编译的是1.9.0,过程相当曲折,要OPENSSL修改版本的,个OPENSSL在这里下载,如果你用一般未修改的OPENSSL 是编译不了,会出现大量错的
https://github.com/pocoproject/openssl
编译好后还要下载一个MYSQL 开发版本,一般是ZIP包,300多M的,要注意,如果你要编译32位POCO,就要下载MYSQL 32位,如果编译64位POCO,就要64位的MYSQL
然后修改 buildwin.cmd
主要修改下面两个地方
set PATH=%ProgramFiles(x86)%Microsoft SDKsWindows7.1ABin;%PATH%
set LIB=%ProgramFiles(x86)%Microsoft SDKsWindows7.1ALib;%LIB%
d:oost_1_68_0 oolsuildsrcengine>if exist bootstrap rd /S /Q bootstrap
d:oost_1_68_0 oolsuildsrcengine>md bootstrap
d:oost_1_68_0 oolsuildsrcengine>cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib /Febootstrapjam0 command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.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 class.c cwd.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
cl : Command line error D8038 : invalid argument '_USING_V120_SDK71_;%CL%'
d:oost_1_68_0 oolsuildsrcengine>exit /b 2
d:oost_1_68_0 oolsuildsrcengine>if exist bootstrap rd /S /Q bootstrap
d:oost_1_68_0 oolsuildsrcengine>md bootstrap
d:oost_1_68_0 oolsuildsrcengine>cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib /Febootstrapjam0 command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.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 class.c cwd.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
cl : Command line error D8038 : invalid argument '_USING_V120_SDK71_;%CL%'
d:oost_1_68_0 oolsuildsrcengine>exit /b 2
D:opensourcelibraryCPPoost_1_68_0>bootstrap.bat
Building Boost.Build engine Bootstrapping is done. To build, run: .2 To adjust configuration, edit 'project-config.jam'. Further information: - Command line help: .2 --help - Getting started guide: http://boost.org/more/getting_started/windows.html - Boost.Build documentation: http://www.boost.org/build/doc/html/index.html
D:opensourcelibraryCPPoost_1_68_0>
如果你是VS2013 并且想编译WINDOWS XP下面可以用的32位库,运行下面语句
b2.exe toolset=msvc-12.0_xp link=static runtime-link=static,shared --build-dir=build/x86 address-model=32 -j5 install --includedir=D:opensourcelibraryCPPoost_1_68_0win32include --libdir=D:opensourcelibraryCPPoost_1_68_0win32libx86 define=BOOST_USE_WINAPI_VERSION=0x0501
最后的 define=BOOST_USE_WINAPI_VERSION=0x0501 是指明XP下面也可以用的,如果你不需要XP也可以把那个参数删除,默认是WIN7的
b2.exe toolset=msvc-14.1 link=static runtime-link=static,shared --build-dir=build/x86 address-model=32 -j5 install --includedir=D:opensourcelibraryCPPoost_1_68_0win32include --libdir=D:opensourcelibraryCPPoost_1_68_0win32libx86
如果你是编译64位,这个命令
b2.exe toolset=msvc-14.1 link=static runtime-link=static,shared --build-dir=build/x64 address-model=64 -j5 install --includedir=d:opensourcelibraryCPPoost_1_68_0win64include --libdir=d:opensourcelibraryCPPoost_1_68_0win64libx64