[Botan-devel] Building Botan with a Static Runtime
cmbrockman at verizon.net
Sun Feb 15 21:49:35 EST 2009
Jack Lloyd wrote:
> Unfortunately I think your only recourse is to edit the Makefile
> directly with the appropriate cl.exe option (/MT, I think?)
Thank you, Jack.
I decided to move the edit to a step earlier in the chain. At line 5 of the
\Botan-1.8.1\src\build-data\cc\msvc file, I changed:
compile_option "/nologo /c "
For release builds it's now:
compile_option "/nologo /c /MT "
For debug builds it's:
compile_option "/nologo /c /MTd "
Note that there should be a space between the runtime library switch and the
trailing quotation mark. I couldn't find any reference to the /MD runtime
library switch in the original file. Apparently that's the default for the
My application builds as expected if I'm mindful of the switch positions. If
I've been working with the debug version of my program and want to build the
release version I have to remember to rebuild the Botan library so that
LIBCMT.LIB is invoked and not LIBCMTD.LIB.
More information about the botan-devel