Mail Archives: djgpp/1997/05/16/09:37:04
-----BEGIN PGP SIGNED MESSAGE-----
On Thu, 15 May 1997 23:51:37 -0400, evarlast <jrwren AT oakland DOT edu> wrote:
> upon this:
> #include<iostream.h>
> void main(void)
> {
> cout << "blah";
> };
>
> I get this as a result. - my DJGPP.ENV is set fine.
>
> P:\lbah>gcc blah.cpp
> P:/tmp\ccdaaaaa(.text+0x16):blah.cc: undefined reference to `cout'
> P:/tmp\ccdaaaaa(.text+0x1b):blah.cc: undefined reference to
> `ostream::operator<<
>
> (char const *)'
Try: gxx blah.cpp
This will link the required libraries automatically. I guess your
semi-colon after the body of main() is a typo.
Mark.
- --
________________________________________________________________
Mark Lewis - Software Engineer, City University, London, England
Email: M DOT Lewis AT city DOT ac DOT uk, nostra AT city DOT ac DOT uk (MIME,PGP)
WWW : http://www.city.ac.uk/nostra/
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
iQCVAgUBM3xPwL+exwC8S2+xAQHCDgP/SBzCPfL+O3GAgucXvcEORpSvdCBSNVe2
/B2IPBSNj64hlcZOuFzA/lHAGtX/YfxAuYRrbXtFh0Ro9bNxgvuRFMJcSu4Bclzk
+TJnl0xYa4kYsEUKHMsnQQ6jgwjM8hBeAyHWLldjNiloUlHbUylmH9tE7b9oJ7GN
NIT5pxd40KU=
=dEt1
-----END PGP SIGNATURE-----
- Raw text -