How do I build Boost 1.55 with MinGW?

前端 未结 4 1305
-上瘾入骨i
-上瘾入骨i 2020-12-14 08:08

I have downloaded Boost 1.55 and MinGW.

The console answers me that I haven\'t any command. I can\'t understand how to bind two paths and activate the GCC compiler.<

4条回答
  •  温柔的废话
    2020-12-14 08:36

    Greatwolf's answer didn't work for me, so here's how I managed to get it working.

    First, make sure MinGW\bin is on your path

    Go to the tools\build\v2 directory of your boost folder. For example, in my case it was C:\Boost\boost_1_55_0\tools\build\v2. Then run

    bootstrap mingw
    

    After that, switch to the root Boost directory (this part is important since b2 detects what to build based on current directory)

    Now, if you want to build Filesystem, do

    tools\build\v2\b2 toolset=gcc --build-type=complete stage --with-filesystem
    

    This will put libboost_filesystem-mgw48-d-1_55.dll etc. in stage\lib. If you want to build everything, just leave off the --with-filesystem part.

提交回复
热议问题