I'm compiling for Windows under MSYS using clang++ and haven't noticed any problems yet. As long as you're in the correct MSYS environment (ucrt64 for gcc, clang64 for clang), you'll get a binary that links against Windows' ucrt and gcc's / clang's C++ lib.
For portability's sake, you should probably statically link libwinpthread and whatever C++ library you end up picking.
For clang's libc++, you need to add -stdlib=libc++.
For portability's sake, you should probably statically link libwinpthread and whatever C++ library you end up picking.
Code:
-static-libstdc++ -static-libgcc -Wl,--gc-sections,-Bstatic -lwinpthread -Wl,-Bdynamic
Statistics: Posted by diroxe7660 — Wed Jul 17, 2024 3:37 pm