方式1

设置环境变量MSVCDIR
image.png
使用VC6.0打开vc6.mak
image.png
build
image.png

方式2

准备

  • 下载boost_1_34_1
  • 配置build.bat中的if "_%ProgramFiles%_" == "__" set ProgramFiles=

image.png

  • 配置build.bat中的VCVARS32.BAT

image.png

Build

  • 双击boost_1_34_1\tools\jam\src\build.bat ```shell

    rd /S /Q bootstrap

md bootstrap

cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG 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 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 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 ‘cl’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。

  1. 改为绝对路径<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/1599044/1638150785291-96a66f24-cfa8-4fd3-b5e7-ee6effb29551.png#clientId=u1379cbe1-4502-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=546&id=ub9247566&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1092&originWidth=1299&originalType=binary&ratio=1&rotation=0&showTitle=false&size=173564&status=done&style=none&taskId=u29230978-6eac-408c-98ac-5a8d2cad969&title=&width=649.5)
  2. ```shell
  3. .\bootstrap\jam0 -f build.jam --toolset=msvc "--toolset-root=C:\DevelopSoftware\vc6super\VC98\ "
  4. ...found 45 targets...
  5. ...updating 1 target...
  6. [COMPILE] bin.ntx86\bjam.exe
  7. command.c
  8. compile.c
  9. debug.c
  10. expand.c
  11. glob.c
  12. hash.c
  13. hcache.c
  14. headers.c
  15. hdrmacro.c
  16. jam.c
  17. jambase.c
  18. jamgram.c
  19. lists.c
  20. ...

执行bjam.exe

.../boost_1_34_1/tools/jam/src/bin.ntx86下生成一个bjam.exe文件
image.png
bjam.exe拷贝到.../boost_1_34_1/目录下

并设置临时环境变量

> SET MSVC_ROOT="C:\DevelopSoftware\vc6super\VC98"
> SET VISUALC="C:\DevelopSoftware\vc6super\VC98"

如果需要编辑python模块还需要下载安装python,并设置以下环境变量

> SET JAM_TOOLSET=VISUALCSETPYTHON_ROOT=
> SET PYTHON_VERSION=2.3

执行命令

> ./bjam -sTOOLS=msvc-6.0 (orbjam -sTOOLS=msvc-6.0 install)
> ./bjam install

有问题,没有生成lib

bjam stage –toolset=msvc-6.0 –stagedir=”C:\SDK\boost\bin” link=staticruntime-link=shared threading=multi debug release
bjam --without-python --toolset=msvc-6.0 --build-type=complete stage
bjam --without-python --toolset=msvc-6.0 --build-type=complete install