can anybody please explain for me how and why /clr is incompatible with /mtd ? What is the alternative for this? What happens internally if I use /md or /mdd ?
As far as I know we don't combinedly use /clr and /mtd. Can someone explain if there is a way to do this? And please explain me how and why /clr is incompatible with /mt and /mtd in Visual Studio?
I expect the clue is given here:
If you are using the /clr compiler switch, your code will be linked with an import library, msvcmrt.lib. The import library references a new library, msvcm80.dll, which provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( /MT or /MTd options) with /clr. Use the dynamically-linked libraries (/MD or /MDd) instead.
The /clr flag causes your code to reference a new dll msvcm80.dll - this acts as a proxy between your managed code and the CRT. It's difficult to say exactly what this proxy does, but I guess it acts as an interface for allocations on the managed heap, garbage collection, managed threads and that kind of thing. If you link the static versions of the CRT, then the proxy would not be able to intercept your calls to the runtime libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With