Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Sun, 4 Nov 2001 14:21:58 -0500 (EST) From: David A Fiden To: Subject: A Solution: mingw in cygwin Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII After great gobs of my time trying to get a C++ console program to compile under cygwin using -mno-cygwin, I found a solution (workaround). Check out the link: http://www.cse.buffalo.edu/~dafiden/cygwin/ Here is a transcription of the page: Getting cygwin to compile C++ using -mno-cygwin Install cygwin as normal. Install the extra mingw headers and libraries from the gcc-2.95.2-mingw-extra.tar.gz file. Here's a link to a file I modified for convenience: gcc-2.95.2-mingw-extra.tar.gz (If this doesn't work, or if I find out I'm not allowed to do this ;), just get the regular gcc-2.95.2-mingw-extra.tar.gz file from here: ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygb20/gcc-2.95.2/gcc-2.95.2-mingw-extra.tar.gz and make the files correspond to the structure defined below). Setup the gcc-2.95.2-mingw-extra.tar.gz file as follows: drwxr-xr-x dafiden/unknown 0 2001-11-04 13:35:16 lib/ drwxr-xr-x dafiden/unknown 0 2001-11-04 13:35:16 lib/mingw/ -rw-r--r-- dafiden/unknown 247138 1999-11-06 21:01:04 lib/mingw/libg2c.a -rw-r--r-- dafiden/unknown 108104 1999-11-06 21:01:04 lib/mingw/libgcc.a -rw-r--r-- dafiden/unknown 255248 1999-11-06 20:56:12 lib/mingw/libiberty.a -rw-r--r-- dafiden/unknown 492 1999-11-07 04:36:26 lib/mingw/libm.a -rw-r--r-- dafiden/unknown 6714 1999-11-09 01:43:22 lib/mingw/libmingw32.a -rw-r--r-- dafiden/unknown 108840 1999-11-06 21:01:04 lib/mingw/libobjc.a -rw-r--r-- dafiden/unknown 883758 1999-11-06 21:01:04 lib/mingw/libstdc++.a drwxr-xr-x dafiden/unknown 0 2001-11-04 13:35:26 usr/ drwxr-xr-x dafiden/unknown 0 2001-11-04 13:35:16 usr/include/ drwxr-xr-x dafiden/unknown 0 2001-11-04 13:35:16 usr/include/mingw/ -rw-r--r-- dafiden/unknown 2797 1999-11-06 20:55:40 usr/include/mingw/_G_config.h type this: ln -s /usr/include/g++-3 /usr/include/mingw/g++-3 edit the file: /lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs where it reads: *libgcc: %{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt} change it to read: *libgcc: %{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmsvcrt -lcrtdll} You can check to see if it works with a "hello world" c++ program. type: g++ -mno-cygwin hello.cpp a (You can use my hello.cpp and check for a message with a 5 second sleep in between) If it works, "you done good." I haven't done a lot of programming until recently, so I imagine that mingw libstdc++ looks for some DLL stuff in libcrtdll. Consequently, one needs to add that lib to the default specs for g++. EMAIL:dafiden AT cse DOT buffalo DOT edu -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/