Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <19990707172348.16732.rocketmail@web601.yahoomail.com> Date: Wed, 7 Jul 1999 10:23:48 -0700 (PDT) From: Earnie Boyd Reply-To: earnie_boyd AT yahoo DOT com Subject: Re: mingw32 vs. cygwin To: Reza Habib , Cygwin Mailing List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- 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 mingw32. 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 as a symbol to reference the disk device you've installed the tool set. I'll use -> to indicate a cygwin symbolic link. /bin /etc /cygwin/b20 /cygwin/b20/bin -> /bin /cygwin/b20/etc -> /etc /cygwin/b20/tmp -> /tmp /cygwin/b20/usr /cygwin/b20/usr/bin /cygwin/b20/usr/include /cygwin/b20/usr/lib /cygwin/b20/usr/local /cygwin/b20/usr/local/bin /cygwin/b20/usr/local/include /cygwin/b20/usr/local/lib /cygwin/b20/usr/local/share /cygwin/b20/usr/share /home /tmp /usr /usr/bin /usr/include /usr/lib /usr/local/bin /usr/local/include /usr/local/lib /usr/local/share /usr/share Directory Components: --------------------- In what I'm about to give you assume that I mean `mv' the components unless otherwise stated. /bin contents: bash.exe, sh.exe, cygwin1.dll, mount.exe, umount.exe, cygcheck.exe /etc contents: termcap /cygwin/b20/* contents: from the cygwin FULL.EXE install move the contents of all bin directories to /cygwin/b20/usr/bin/ move the contents of all include directories to /cygwin/b20/usr/include/ etc. Use the /cygwin/b20/usr/local/* directories for user built cygwin programs. /usr/* contents: from the mingw32 distribution move the appropriate components. Use the /usr/local/* directories for user built mingw32 programs. Cygwins Mounted Directories: ---------------------------- First let me say that just like UNIX cygwin likes to have "mount points" so you should mkdir / where represents each device letter that you have or plan to access with cygwin (remember represents the installation device). And you should mkdir /cygwin/b20/ as well. Once you have those directories created you can then do `/bin/mount :\\ /'. 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 :\\ /' when you want to use the mingw32 compiler tools and you'll do `/bin/umount / && /bin/mount :\\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: export PATH=/bin:/usr/bin:/usr/local/bin:::. 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 @yahoo.com address at http://mail.yahoo.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com