Mail Archives: djgpp/1997/07/21/09:47:40
Gary Tan wrote:
>
> hi all,
> i'm new here (student). Please bear with me.
>
> I just downloaded the DJGPP files for MSDOS and installed it.
>
> I can't seem to compile my .cpp programs
>
> an error looks like this:
>
> c:\djgpp\source>gcc a.cpp <return>
> c:/djgpp/tmp\ccdaaaaa(.text+0x4a):a.cc: undefined reference to 'cout'
> c:/djgpp/tmp\ccdaaaaa(.text+0x4f):a.cc: undefined reference to
> 'ostream::operator << (char const*)'
>
> a.cpp looks like:
>
> #include <iostream.h>
> #include <stdlib.h>
> main()
> {
> int * ipTemp1, *ipTemp2;
> ipTemp1 = (int*) malloc (sizeof(int));
> ipTemp2 = (int*) malloc (sizeof(int));
> *ipTemp1 = 2;
> ipTemp1 = ipTemp2;
>
> cout << "This is a test";
>
> }
>
> and my djgpp.env is default.
> also set the environment stuff set djgpp=c:\djgpp\djgpp.env
> set path=c:\djgpp\bin;%PATH%;
>
> pls help me!
>
> regards,
> Gary Tan
> pls reply garyt AT pacific DOT net DOT sg
> Gary Tan
> garytan AT pobox DOT org DOT sg
> garyt AT pacific DOT net DOT sg
> s5545301 AT np DOT ac DOT sg
Try typing "gxx a.cpp[enter]" instead. This still invokes gcc, but with
C++ as the default language.
--
-Begin Signature-
Isaac Waldron <waldroni AT lr DOT net> N1YZI
http://www.geocities.com/SiliconValley/Lakes/5703/home.html
-End Signature-
- Raw text -