[ofw] RE: [PATCH] WV: Don't link to CRT

Fab Tillier ftillier at windows.microsoft.com
Mon Feb 23 12:33:09 PST 2009


>> This patch removes the dependency on the CRT, avoiding any potential
>> issues with mismatched CRTs (say a client app uses the single-threaded
>> static version of the CRT while WinVerbs uses the multi-threaded DLL
>> version.)
>  USE_MSVCRT makes it simple to add debug print output to the library. Is
> this change really necessary?  We're not allocating any threads, so a
> single-threaded app should always be able to use a multi-threaded DLL.
>
> (It's not a huge deal to have to change it back before adding prints, I
> just want to understand the issue better.)

The MSDN docs have warnings about mixing CRTs:

http://msdn.microsoft.com/en-us/library/ms235460.aspx

http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx

Note that single/multi-threaded issues seem to be resolved, leaving just static vs. DLL linkages.  It's possible we won't have any issues, as we're linking to the DLL version.  The other DLLs (IBAL, complib, WSD provider, ND provider) don't link to the CRT to avoid any potential issues, however, and it just seemed like a simple change with no repercussions at the moment.

-Fab



More information about the ofw mailing list