November 28, 2006

cygwin, mingw and runtime libraries

I have been trying to get gcc to compile dll's that I can use with msvc 8.0. Turns out that the accepted practice involves taking the standard mingw/cygwin install and copying and renaming library files.

The compiler always wants to link msvcrt.dll, so to link with msvcr80 we have to create a directory containing a copy of the mingw/cygwin distribution's msvcr80.a library renamed to msvcrt.a, and then specify this directory as a library path when we link.

Wouldn't it be simpler if the distribution came set up that way?