From: Raoul G. <Rao...@ya...> - 2003-01-11 00:01:21
|
"Wolfgang Spraul" <ws...@q-...> wrote in message news:200...@q-...... > I'm about to write a DLL that should not depend on cygwin1.dll. -mno-cygwin > works fine, the DLL builds and has no cygwin dependencies. > > However, the MinGW FAQ says "a much easier option to '-mno-cygwin' does exist" > and then explains how to install the 'native' MinGW alongside Cygwin. > > Now I have some questions: > > 1) Why is it "easier" to install mingw alongside Cygwin than to use the > -mno-cygwin? For building one DLL, assuming that you're writing it in C, there shouldn't be any problem. However, in the longer term, I think the native MinGW compiler is much easier to use if you want to avoid the Cygwin1.dll dependency. Here are my experiences using -mno-cygwin from a year or so back: The first problem was that libstdc++ is compiled *with* Cygwin.dll dependencies, so you can't actually get real independence for your C++ code. What I did then was install STLport as an alternative standard C++ library, but building it in -mno-cygwin mode was fairly difficult. The same is true of the Boost libraries, which build easily for Cygwin *or* MinGW, but not -mno-cygwin. I actually contributed my work sorting out the problems to Boost, but I wouldn't really recommend it to you. Basically, if you're developing in C++, or you want to use source libraries from third parties, you will always have extra hassle using -mno-cygwin (even if it's just changing the compiler flags in one Makefile per library). Maybe things have changed since then, but I doubt it. > > 2) What MinGW functionality is missing in the Cygwin packages gcc-mingw, > w32api, mingw-runtime? Will there be additional Cygwin packages in the future > (mingw-utils)? As far as I know, it's all in there. You also have the niceties like a Tk GUI for GDB, which you don't have with MinGW (OK if you like that kind of thing). I have a kind of mixture on my system, but I definitely rely more on the MinGW compiler, and don't mess around with -mno-cygwin any more. > > 3) Is my assumption correct that the MinGW development happens on the sf.net > project, so the Cygwin packages are usually older versions? The latest Cygwin > has gcc-mingw 2002-0817-4, mingw-runtime 2.3-1 and w32api 2.1-1. Looks fairly > recent to me. > > 4) Are there any tools in the MinGW native files (from sf.net) that are not in > the Cygwin packages (pexports?)? > > 5) What is the advantage of using the non-Cygwin msys tools over using the > Cygwin tools? The only thing I can think of is with automatic build configuration utilities. I actually use the Cygwin bash, becuase I've never bothered downloading MSys. Sometimes I have to override configure's host detection mechanisms (because it starts building the Cygwin version of something like gcc, when I want the MinGW version instead). Regards, Raoul Gough. |