iostreams won't work

Matthew Mueller
Wed Apr 23 20:58:00 GMT 1997

when I try to compile this program:

#include <iostream.h>
#include <stdio.h>
int main(void){
  cout << "hi.\n";
  cout << "bye.\n";
  return 0;

I get this error:

f:\prog\c32>gcc test.cpp
C:\WIN95\TEMP/cc0010001.o(.text+0x1a) undefined reference to `cout'
C:\WIN95\TEMP/cc0010001.o(.text+0x1f) undefined reference to
operator<<(char const *)'
C:\WIN95\TEMP/cc0010001.o(.text+0x60) undefined reference to `cout'
C:\WIN95\TEMP/cc0010001.o(.text+0x65) undefined reference to
operator<<(char const *)'

I have all the environment vars set as specified in the FAQ.  I have
successfully compiled several standard c program.
Matthew Mueller
For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list