A bunch of these files were committed with Windows line encodings. Strip all those ^M gremlins out as people working on Windows can use git's autocrlf setting to convert back and forth as needed.
On Windows all exported functions are declared as stdcall, which is incompatible with cdecl on x86 Windows.