linking and iostreams

Greg Miller
Fri Mar 12 12:12:00 GMT 1999

This program:

#include <iostream>

int main() {
  cout << "test" << endl;

  return 0;

compiles, links, and does what I expect when compiled with B20.1 and
egcs-1.1.1 using this command:

g++ test.c

but generates numerous undefined references during linking when compiled

g++ -mno-cygwin test.c

Notably, it generates a number of references to "__errno" from
libstdc++.a, which, AFAIK, should not include ANY references to
"__errno" in the mingw-libs version.

So what am I doing wrong?
President Clinton was acquitted; then again, so was O. J. Simpson.
*** NEWBIES: Limit signatures to four lines! No HTML mail or posts! ***

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list