Thread overview
Where does the Windows mingw libs come from ?
Jun 06
user1234
Jun 06
kinke
Jun 07
user1234
June 06

If I use those coming with the mingw64 proposed by a linux package manager, manually linking a betterC object containing a simple main fails with an error about "undefined mainCRTStartup".

But if I use those coming from ldc2 64 bit windows distribution that works perfectly.

command is

$ lld-link /NOLOGO /OPT:REF /OPT:ICF /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup\
 /errorlimit:0 /OUT:a.exe /LIBPATH:$LP\
 /DEFAULTLIB:$DL\
 .main.o

with LP either

  • /usr/x86_64-w64-mingw32/sys-root/mingw/lib (not working version)
  • /home/xx/bin/ldc2-/lib/mingw (copied from the ldc2 win release)

and DL either

  • libvcruntime140_app.a (not working version)
  • vcruntime140 (ldc2 one)

So I wonder where do your mingw libraries come from ?

June 06

On Monday, 6 June 2022 at 00:15:56 UTC, user1234 wrote:

>

So I wonder where do your mingw libraries come from ?

They're from https://github.com/ldc-developers/mingw-w64-libs; see its README.md for details.

June 07

On Monday, 6 June 2022 at 00:43:32 UTC, kinke wrote:

>

On Monday, 6 June 2022 at 00:15:56 UTC, user1234 wrote:

>

So I wonder where do your mingw libraries come from ?

They're from https://github.com/ldc-developers/mingw-w64-libs; see its README.md for details.

thanks, the work done on your version of vcruntime140.lib is valuable.