delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/23/03:43:47

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: c++ and -mno-cygwin
23 Dec 1998 03:43:47 -0800 :
Message-ID: <199812230655.AAA22692.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <1 DOT 5 DOT 4 DOT 32 DOT 19981223023745 DOT 0067f7f0 AT lola DOT univ-lemans DOT fr>
To: Serguei DACHIAN <Serguei DOT Dachian AT univ-lemans DOT fr>
Cc: gnu-win32 AT cygnus DOT com

Serguei DACHIAN <Serguei DOT Dachian AT univ-lemans DOT fr> writes:
> with the flag "-mno-cygwin" (just lile "g++ -mno-cygwin hello.cpp") fails
> with lots of undefined references in "libstdc++.a".  Apparently it is
> impossible to use this flag with g++/c++, but only with gcc.  Is it a bug or
> an intention??? Is there any workarround [ except rewriting the program in C
> :-))) ].

I've written about this at least a few times already, so I won't repeat it.
Essentially, you need to either build the mingw target libraries or get
them out of the mingw32 egcs-1.1 binary package. The target libraries are:
libstdc++.a (C++ runtime), libiberty.a (if you need it for various BSD'ish
but non-POSIX routines such as random); there are also other libraries
such as Tcl/Tk, BFD etc, but most users don't need them. 

You can pick up libstdc++.a and libiberty.a from:
    ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygb20/egcs-1.1/ 
look for mingw-libs.tar.gz. Put these in some directory and you can
either use -L/path/to/mingw/libs or modify specs to include this in
the library search path whenever mno-cygwin is specified.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019