This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Help needed compiling using gcc
- To: gcc-help at gcc dot gnu dot org
- Subject: Help needed compiling using gcc
- From: Sahar Isaac <dominic at clara dot net>
- Date: Wed, 19 Apr 2000 19:31:46 +0100
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;
}