On 7/9/2013 21:40, Baruch Burstein wrote: > On Tue, Jul 9, 2013 at 3:56 PM, JonY <[email protected]> wrote: > >> On 7/9/2013 20:42, Baruch Burstein wrote: >>> >>> Static libraries compiled with the VS compiler (I think toolchain is the >>> correct term?) cannot be used with mingw compiler as far as I know. So >> when >>> I compile with mingw and a static CRT, which CRT is it using? It can't be >>> using the Windows CRT, since it is a static library from a different >>> compiler. So does mingw actually supply a CRT? And if so, when I compile >>> with a dynamic CRT, why is there no dependency on some mingwCRT.dll? Or >> is >>> there? Or does mingw supply a static CRT, but use the Windows CRT for >>> dynamic CRT? Or am I missing some critical knowledge about what CRTs are >>> without which this whole paragraph makes no sense? I am confused. >>> >> >> It does, but only as a supplement to msvcrt.dll, and it is almost always >> linked statically. There is no such dll, the supplement is in >> libmingwex, C startup code in libmingw32 etc. >> > > So if the libmingwex is always linked statically, and the main part of the > CRT is always used dynamically from MSVCRT.dll (since static libraries from > different compilers can't be mixed), then what is the difference between > static and dynamic CRT linking? Or am I wrong and there is no such thing in > mingw(-w64)? >
You have to first understand libmingwex does not replace MSVCRT in any important way, it is simply a supplementary library to fix anything that is lacking from MS. Anything lacking from MS, we add into libmingwex. There is a library under development by mingw-w64 called ironcrate which is intended to replace MSVCRT.dll, so you can use static CRT with mingw-w64 too. It is still a long way off. You can still use MSVC static libs, just that it is a lot harder, since anything not a DLL is very much implementation specific. DLLs serve to isolate that and form a proper interface to separate the under layers. Note that this will not work with 64bit, only in the 32bit case, where it is already ymmv territory.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
