Several questions:
Is it correct to understand that MinGW is essentially taking the gcc source and compiling it into an executable for windows, i.e gcc.exe?
MinGW wiki says "MinGW on the other hand, provides functions supplied by the Win32 API.". This confuses me. Doesn't a Windows installation by default already provide the Win32 API headers that exposes the Win32 API, which would make MinGW providing it again redundant? Are the headers MinGW provides different to the ones that come with a Windows installation?
When I have an object file compiled by MinGW gcc, can I just link it to the C runtime library on windows? I'd think not because the object file generated by MinGW gcc may not be compatible(like uses the same calling conventions) as the C runtime library on windows.
What do you mean by "gcc source"? When you say "gcc source" you might mean "the source code of the GCC compiler". MinGW is a windows version of GCC, so it takes any C source code and produces executables, and it is GCC so it has the features of that compiler.
I think the header files provided by Microsoft (e.g. windows.h and winusb.h) are not actually compatible with GCC. The MinGW project includes header files that are compatible with GCC so you can call Windows functions like
ReadFilefrom your program. The last time I checked, MinGW only had some of the Microsoft header files; it was missing winusb.h.Why do you want to link with a Windows runtime library? I know that cross-compiler interop is possible because I once wrote a DLL with the Microsoft C compiler and called it from a MinGW (Qt) program.