您的位置:首页 > 其它

VS2013编译boost

2017-07-26 20:26 483 查看
启用vsd2013.5的vs2013开发人员命令提示工具,我的电脑在这个路径下:C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts

为了解决

C:\Program Files (x86)\Microsoft Visual Studio 12.0>cmake

‘cmake’ 不是内部或外部命令,也不是可运行的程序

或批处理文件。

要根据我的文章 http://ixiaomo.net/2015/11/09/win10%E8%AE%BE%E7%BD%AEpath/

配置开发环境。

==1==vc编译boost的build engine======

K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0>bootstrap.bat

Building Boost.Build engine

Bootstrapping is done. To build, run:

.\b2


To adjust configuration, edit ‘project-config.jam’.

Further information:

- Command line help:
.\b2 --help

- Getting started guide: http://boost.org/more/getting_started/windows.html 
- Boost.Build documentation: http://www.boost.org/build/doc/html/index.html


K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0>

====2 使用b2 编译boost库=======

参考 avplayer的wiki,https://wiki.avplayer.org/%E7%BC%96%E8%AF%91boost,这里要求用b2 +vs

参考 ripple的 wiki, https://wiki.ripple.com/Visual_Studio_2013_Build_Instructions ,这里用的是bjam+vs

vs2013的msvc版本是12.0,否则会报错:

K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0>b2.exe boost.locale.iconv=on –toolset=msvc-12 link=static –buildtype=complete install –with-system –with-thread –with-locale –with-log –with-filesystem –with-program_options –with-regex –with-date_time –with-timer –with-chrono

…found 1 target…

…updating 1 target…

msvc.write-setup-script C:\Users\ADMINI~1\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86.cmd

…updated 1 target…

…found 1 target…

…updating 1 target…

msvc.write-setup-script C:\Users\ADMINI~1\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_amd64.cmd

…updated 1 target…

…found 1 target…

…updating 1 target…

msvc.write-setup-script C:\Users\ADMINI~1\AppData\Local\Temp\b2_msvc_12.0_vcvarsall_x86_arm.cmd

…updated 1 target…

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src/build\feature.jam:313: in implied-subfeature from module feature

error: “12” is not a known subfeature value of msvc

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src/build\feature.jam:500: in validate-value-string from module feature

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src/build\feature.jam:364: in expand-subfeatures-aux from module feature

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src/build\feature.jam:425: in feature.expand-subfeatures from module feature

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src/build\build-request.jam:20: in apply-to-property-set from module build-request

(builtin):-1: in sequence.transform from module sequence

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src/build\build-request.jam:32: in build-request.expand-no-defaults from module build-request

K:/TOOLS/MYTOOLS/cmake/boost_1_59_0/boost_1_59_0/tools/build/src\build-system.jam:594: in load from module build-system

K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0\tools\build\src/kernel\modules.jam:295: in import from module modules

K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0\tools\build\src/kernel/bootstrap.jam:139: in boost-build from module

K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0\boost-build.jam:17: in module scope from module

K:\TOOLS\MYTOOLS\cmake\boost_1_59_0\boost_1_59_0>

使用如下指令(来自avplayer的wiki):

b2.exe boost.locale.iconv=on –toolset=msvc-12.0 link=static –buildtype=complete install –with-system –with-thread –with-locale –with-log –with-filesystem –with-program_options –with-regex –with-date_time –with-timer –with-chrono

=====3 编译ok了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: