delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/06/06:17:01

Date: Wed, 6 Dec 1995 09:21:04 GMT
From: "C. N. Feng" <fengcn AT essex DOT ac DOT uk>
Subject: undefined reference to ...
To: DJGPP <djgpp AT sun DOT soe DOT clarkson DOT edu>

Hi,

I have downloaded ez-gcc-X.zip recently.
The versions of gcc and go32 in this package are
gcc 2.6.0 and go32 1.12.maint3.

When I ran the test program t02.bat, I got the following error messages.

undefined reference to 'endl(ostream&)'
undefined reference to 'cout'
undefined reference to 'ostream::operator<<(char const*)'
undefined reference to 'ostream::operator<<(ostream&(*) (ostream&))'

--- The code for t02.bat is 
gcc -v t02.cc -o t02 -lgpp
go32 t02

--- The  code for t02.cc is
#include<iostream.h>
main()
{cout<<"Hello, world from t02.cc!"<<endl;}

----------------------------------------------------------------------
The zip files for compileing C++ source code are unziped.
In the autoexec.bat file, I added
set DJGPP=C:/DJGPP/DJGPP.ENV
set GO32=ansi driver c:/djgpp/drivers/stdvga.grn emu c:/djgpp/bin/emu387
path=c:/djgpp/bin;.....

Did I miss anything else?

Thanks

Cheng-Ning Feng


- Raw text -


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