HI, Realized I just be bottom posting. Sorry about that.
-----Original Message----- From: Martin Storsjö <[email protected]> Sent: Saturday, March 23, 2019 6:09 PM To: [email protected] Subject: Re: [Mingw-w64-public] Adding Visual Studio 2017 support to MinGW-w64 On Sat, 23 Mar 2019, Kacvinsky, Tom wrote: > Hi Martin, > > I have a mixed C, C++, and Ada source tree. I used Visual Studio to > compile C and C++ code, and a MinGW-w64 based Ada compiler. What I > would like to do is get MinGW-w64 version 5.0.4 (which is what the Ada > compiler is based on) to have support for the Visual Studio CRT. > > So, what I'd like to do is get the specs file used by the Ada compiler > to have the necessary > moldnames140 and vcruntime140 (or equivalent) library files for > linking, so I don't have a mismatch in the runtimes used by Ada > produced DLLs (via gnatdll) and the run time libraries used by C/C++ based > libraries and executables. > > I suppose an option here is to see what is done in MinGW-w64 6.x and > see if I can backport it to 5.0.4. The support for the UCRT, which is what you want, isn't that trivial to backport - it's rather many changes in many places. The best way to use it is to rebuild mingw-w64 from scratch with both headers and crt built with --with-default-msvcrt=ucrt (or ucrtbase). Then your "libmsvcrt.a" actually will be the libucrt.a (or libucrtbase.a) and will link against api-ms-win-crt-*.dll or ucrtbase.dll. (VS 2017 by default links against api-ms-win-crt-*.dll if linking the CRT dynamically.) You don't need to care about moldnames, in modern mingw-w64 versions that's an empty library. And vcruntime140 doesn't matter either, you don't need it (unless you are packaging an app for windows store). Question: will the libucrt.a build with v6.0.0 work witch v5.0.4, or will I need more changes than that? I am locked into v5.0.4 for the Ada toolchain I am using _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
