Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Want to compile and build boost library with /md option on windows

I have a requirement of building the boost boost_1_59_0 librabry with /md option instead of /mt.

could anybody here help me. I see there is one file build.jam where /mt is used at many places but not sure replacing /mt with /md in this file will fulfill my requirement.

like image 563
Jeetu Avatar asked Nov 24 '15 11:11

Jeetu


2 Answers

/MT: b2 runtime-link=static
/MD: b2 runtime-link=shared  <= The default value

You can also build all libraries, as Grigoriy suggested. In this case, the output filenames will be different. For example:

/MT: libboost_regex-vc141-mt-s-1_65.lib
/MD: libboost_regex-vc141-mt-1_65.lib
like image 177
Eugene Avatar answered Sep 20 '22 09:09

Eugene


You can run b2 with the option --build-type=complete. It should build all supported variants of the libraries

OR

you can use something like this: b2 variant=release,debug link=static to build just the static version of the required library.

like image 23
Grigorii Chudnov Avatar answered Sep 20 '22 09:09

Grigorii Chudnov