www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/17/01:09:30

Date: Mon, 17 Jun 1996 07:55:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Quan Liang <qliang AT ix DOT netcom DOT com>
Cc: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: Re: Help Beginning
In-Reply-To: <01BB5BCF.21042BE0@nyc-ny12-15.ix.netcom.com>
Message-Id: <Pine.SUN.3.91.960617074700.13778A-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019