This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mingw32 vs. cygwin

--- Reza Habib <> wrote:
> Hello.  I'm new to these tools and have a question about these two
> compilers: cygwin b20.1 and mingw32 both with egcs 1.1.2.  I will be mainly
> developing native win32 code not porting unix programs to win32.  Although
> the compilers are the same, does the overhead of the cygwin.dll
> significantly slow down programs?  The reason I ask this is because I want
> to use the blitz++ library.  I tried compiling this library with mingw32 +
> the cygwin user tools.  Although the configure step ran properly, I got
> errors during the make (seemed like something to do with paths and not
> finding files).  I had no problems compiling the library with the full set
> of cygwin tools.  Because of this, I would like to stay with cygwin if there
> isn't much of a performance hit.  Thanks very much.

Hi Reza,

Alright, let's answer the easy one first.

Yes, the POSIX emulation supplied by the cygwin1.dll slows down significantly
the processing of programs.  If you are not porting UNIX code stick with

Problems with make:  
I use a blend of cygwin and mingw32.  This blend affords me the luxury of
having the user tools of UNIX with a native (Windows32) GNU based compiler set.
 I use the make tool from the cygwin distribution rather than the natively
built make tool found on Mumit's site as I've not been successful with it and
haven't spent the time to figure out what is wrong.  Make sure that you've SET
MAKE_MODE=UNIX before using the cygwin make tool to have make recognize the
POSIX paths.

Directory Structure:  
When mixing cygwin and non-cygwin programs in your tool set then you have to
think about how to structure you directory so that the mix can understand each
other as cygwin programs use the mount table to map logical to physical
directories.  I tend to make certain that the packages build on the same disk
device as the tool set resides.  Remember that the mingw32 build of the
compiler set is non-cygwin so it won't use the mount table to map logical to
physical directories.

I tend to move the pieces to a more "standard" UNIX directory structure.  I'll
give you a suggested directory tree and use <d> as a symbol to reference the
disk device you've installed the tool set.  I'll use -> to indicate a cygwin
symbolic link.

<d>/cygwin/b20/bin -> <d>/bin
<d>/cygwin/b20/etc -> <d>/etc
<d>/cygwin/b20/tmp -> <d>/tmp

Directory Components:
In what I'm about to give you assume that I mean `mv' the components unless
otherwise stated.

<d>/bin contents: bash.exe, sh.exe, cygwin1.dll, mount.exe, umount.exe,

<d>/etc contents: termcap

<d>/cygwin/b20/* contents: from the cygwin FULL.EXE install move the contents
of all bin directories to <d>/cygwin/b20/usr/bin/ move the contents of all
include directories to <d>/cygwin/b20/usr/include/ etc.  Use the
<d>/cygwin/b20/usr/local/* directories for user built cygwin programs.

<d>/usr/* contents: from the mingw32 distribution move the appropriate
components.  Use the <d>/usr/local/* directories for user built mingw32

Cygwins Mounted Directories:
First let me say that just like UNIX cygwin likes to have "mount points" so you
should mkdir <d>/<D> where <D> represents each device letter that you have or
plan to access with cygwin (remember <d> represents the installation device). 
And you should mkdir <d>/cygwin/b20/<D> as well.  Once you have those
directories created you can then do `/bin/mount <D>:\\ /<D>'.

There is also a mount point for the root directory `/'.  This is how you'll
control which tree structure you'll be using.  You will do `/bin/umount / &&
/bin/mount <d>:\\ /' when you want to use the mingw32 compiler tools and you'll
do `/bin/umount / && /bin/mount <d>:\\cygwin\\b20 /' when you want to use the
the cygwin compiler set.

The HOME Directory and Initialization Files:
You need to `SET HOME=/home' before starting bash.  In the /home directory
create a .bashrc file containing:
alias MyFavAlais=command


I hope I haven't confused you.  I'm willing to help more.

PS: Chris or DJ is this FAQable material?

Earnie Boyd <>

Newbies, please visit

(If you respond to the list, then please don't cc me)
Do You Yahoo!?
Get your free address at

Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]