Building a subset of boost in windows

白昼怎懂夜的黑 提交于 2019-11-28 06:02:30

Solved it.

The bcp solution had make files for the projects, however I needed to copy the tools directory and the root of the boost directory to the place I copied all my libs to get things up running.

Great question! This is an issue I have recently managed to figure out, I think.

I already had the full Boost libraries installed, including the ones requiring separate compilation.

I managed to create a subset of the Boost libraries (regex) for a particular application I was working on using the following steps:

  1. First ensure the bcp executable is installed in the first place. In your Boost root folder, navigate to the tools/bcp folder and run the bjam.exe in here. For me this created the bcp executable in [Boost path]\bin.v2\tools\bcp\msvc-10.0\release\link-static directory:

  2. Then create the folder where you would like the Boost subset to reside. This might already be a folder for a Visual Studio project you are working on.

  3. Run the bcp exectubale you created, making sure to include the libraries you wish to include, as well as the location of the boost root directory and the destination folder. Observe how the required Boost components (eg for regex) have been included in your destination folder.

    bcp.exe regex --boost="C:\Program Files\boost_1_55_0\boost_1_55_0" C:\Projects\RegexProject\BoostLite

  4. In your Visual Studio project set the Additional Include Directories and Libraries to point to the 'Boost lite' folder that was created.

  5. One final thing - which I think is described previously - I needed to go to my regular Boost folder setup and copy the required stage/lib folder containing all the lib files needed for the subset version and copy them here, just a few regex-related lib files in my case.

I found that this worked for me. Any feedback from other persons experiences would be appreciated.

A blog posting describing the same thing can be found here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!