Do i have static or dynamic boost libraries?

后端 未结 5 2057
长情又很酷
长情又很酷 2020-12-08 17:04

I have ran bjam.exe --build-dir=\"C:\\build-boost\" --build-type=minimal msvc stage

and now I have libraries .lib with these headers, for example

<
5条回答
  •  一生所求
    2020-12-08 17:42

    Something that is kind of confusing is there are two 'static' options for building boost with MSVC.

    B2.exe takes the option link=static which tells boost that you want to link IT statically. If you are compiling your VC project with /MT or /MTd you will also need to use the runtime-link=static option to tell boost that you will be linking to the VC runtime libraries statically.

    It is the second runtime-link=static which puts the -s in the .lib name.

    My command line for building boost was

    b2.exe --toolset=msvc variant=release link=static threading=multi runtime-link=static stage
    

提交回复
热议问题