Mail Archives: djgpp/1996/07/30/13:48:55
Errors-To: postmaster AT ns1
Date: Tue, 30 Jul 1996 17:50:33 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 512
On 28 Jul 1996, Jasper Hendriks wrote:
> Im experiencing a problem when i compile (gcc test.cc) the following
> program:
>
> #include <stdio.h>
> void main()
> {
> cout << "hello world!";
> }
>
> I get the following message:
> test.cc(.text+0x37): undefined reference to `cout'
> test.cc(.text+0x3c): undefined reference to `ostream::operator<<(char const
> *)'
Please download the DJGPP FAQ list (v2/faq201b.zip from the same place
you get DJGPP) and read section 8.7 of the FAQ, which explains this.
You do not report the compile command line you used, but, I suspect it was something
like:
gcc -o test test.cc
This should have been:
gpp -o test test.cc
The gpp driver adds library references to the standard C++ libraries which gcc does
not. If you do not have gpp get the zip from the same place you got DJGPP.
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -