This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Help needed compiling using gcc


Hi, I was wondering if someone can help me. When I try compiling .c or
.cc files I get error messages saying iostream.h  ---FILE NOT found.

Hmm..but it does exist. I tried doing gcc -i PATHTOFILE test.cc  and I
get a stranger message . Heres the output. The source is right at the
bottom of this email. Thanks for any help as I need to start compiling
stuff on BSD as Im a c++ learner and am stuck ....(PS if this posted to
the wrong forum, pleae accept my apologies..its accidental)

Dominic
/S Isaac

----
OUTPUT on a NEW freeBSD install:

 bash$ gcc  Test.cc
/tmp/ccx26951.o: In function `main':
/tmp/ccx26951.o(.text+0xf): undefined reference to `cout'
/tmp/ccx26951.o(.text+0x14): undefined reference to
`ostream::operator<<(char const *)'
bash$

OUTPUT when file is renamed to .c

bash$ gcc Test.c
hello.c:5: iostream.h: No such file or directory
bash$

( iostream.h DOES exist....I managed to track it down )


SOURCE CODE

// Test.cc

#include <iostream.h>
// This program prints "Testing gcc."

int main()

{
  cout << "Testing gcc .\n";
  return 0;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]