delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/21/09:47:40

Message-ID: <33D36866.31E1@lr.net>
Date: Mon, 21 Jul 1997 09:47:18 -0400
From: Isaac Waldron <waldroni AT lr DOT net>
Reply-To: waldroni AT lr DOT net
Organization: The Computer Nerd
MIME-Version: 1.0
To: garyt AT pacific DOT net DOT sg
CC: djgpp AT delorie DOT com
Subject: Re: DJGPP G++ compilation error
References: <33cfa754 DOT 4682541 AT news DOT pacific DOT net DOT sg>

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 -


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