[Botan-devel] Building Botan with a Static Runtime

Joel Low joel at joelsplace.sg
Sun Feb 15 22:35:23 EST 2009


Actually, you can just edit the generated makefile after configure has been run. The compiler arguments will hold until configure is run again.

And from experience, /MT is default in command line builds and /MD is default in IDE builds (for release, /MDd is default for IDE debug builds)

Regards,
Joel

> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Charles Brockman
> Sent: Monday, 16 February, 2009 10:50 AM
> To: Botan development list
> Subject: Re: [Botan-devel] Building Botan with a Static Runtime
> 
> 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
> Microsoft compiler.
> 
> 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.
> 
> --
> Charles Brockman
> 
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel



More information about the botan-devel mailing list