delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/03/13:45:26

Sender: nate AT cartsys DOT com
Message-ID: <377E4C4C.BC60D90B@cartsys.com>
Date: Sat, 03 Jul 1999 10:45:48 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Trouble coding with C++
References: <dHef3.898$Pd2 DOT 3496 AT cabot DOT ops DOT attcanada DOT net>
Reply-To: djgpp AT delorie DOT com

ES wrote:
> 
> Hello, I am a djgpp beginner who started using djgpp yesterday.
> I downloaded all files, unzipped them all in a folder and edited autoexec.
> First i made a little program with C and compiled it by typing " gcc
> hello.c" Then made a program using C++, (#include <iostream.h>
> ain(){ cout<<"hello\n"; return 0;}) and compiled the file. gcc hello.cpp but
> an error occured. It says.. undefined reference to cout and undefined
> reference to ostream::operator<<(char const*)

See README.1ST.  Basically, you are supposed to use `gxx hello.cpp'. 
But that will (for historical reasons) name your executable a.exe, so
you probably want `gxx -o hello.exe hello.cpp'.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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