You're right about the version, I got it from niXman on github. I called ./build --mode=gcc7.4.0 it has downloaded MinGW 7.3.0 as you said but the GCC installed was 7.4.0.
Anyway, I was able to generate an import lib for vcruntime140 and have replaced -lmsvcrt with -lvcruntime140 but I had some missing symbols and fixed that by adding -lucrt. I am not yet sure if that will get things to work. I am currently still working things out.
Also, do you have any idea if I need to do anything about libmoldname?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I am using mingw 7.4.0.
I see that it has libvcruntime140_app.a. I want to know more about that. What should it be used for and when should it be used?
Testing things out, I can see that the produced exes are dependent on MSVCRT.DLL and using -Wl,--verbose I see that it opens libmsvcrt.a.
I want the output to be dependent on VCRUNTIME140.DLL instead of MSVCRT.DLL. How can this be achieved?
Where did you get version 7.4.0? I can see only 7.3.0: https://sourceforge.net/projects/mingw-w64/files/
I know one trick how to link with msvcr120 (if you set the proper lib name, then maybe it will work in your case too):
g++ -dumpspecs > msvcr120.spec
-lmsvcrt
with-lmsvcr120
and save it.g++ -static -specs=msvcr120.spec -s -O2 -o hello.exe hello.cpp
You're right about the version, I got it from niXman on github. I called ./build --mode=gcc7.4.0 it has downloaded MinGW 7.3.0 as you said but the GCC installed was 7.4.0.
Anyway, I was able to generate an import lib for vcruntime140 and have replaced -lmsvcrt with -lvcruntime140 but I had some missing symbols and fixed that by adding -lucrt. I am not yet sure if that will get things to work. I am currently still working things out.
Also, do you have any idea if I need to do anything about libmoldname?
No.
Last edit: zed 2019-11-11