Mail Archives: djgpp/1996/06/17/01:09:30
On Sun, 16 Jun 1996, Quan Liang wrote:
> I an new to DJGPP and C/C++ in general. I downloaded djgpp 2.0 but it 
> cannot compile my test examples. I don't know what's wrong, hope anybody 
> help.
[snip]
> out<<"test\n";
[snip]
> 
> >gcc -v -o mf myfile.cc
> 
> myfile.cc: In function `int main(...)':
> myfile.cc:6: `out' undeclared (first use this function)
> myfile.cc:6: (Each undeclared identifier is reported only once
> myfile.cc:6: for each function it appears in.)
You meant `cout', not `out', right?
> C:\GNU\TMP>gcc -v myfile.cpp
[snip]
> myfile.cc(.text+0x1d): undefined reference to `cout'
> myfile.cc(.text+0x22): undefined reference to `ostream::operator<<(char const *)'
Use `gxx' instead of `gcc' to compile C++ programs.  And please download 
v2/faq200b.zip from the same place you get DJGPP and read the DJGPP FAQ 
list before you post here.  At least your second problem is explained 
there in so many words (section 8.7).
- Raw text -