www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/01/04:16:30

From: Skye <s_c AT geocities DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.lang.c++
Subject: Re: Undefined cout?
Date: Mon, 31 Mar 1997 22:46:08 -0800
Organization: Uniserve
Lines: 27
Message-ID: <3340AF30.5984@geocities.com>
References: <Pine DOT LNX DOT 3 DOT 93 DOT 970401115203 DOT 12541B-100000 AT ecs DOT school DOT net DOT hk>
Reply-To: s_c AT geocities DOT com
NNTP-Posting-Host: dy2-45.van.tvs.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

John Wong wrote:
> 
> I've got a question about DJGPP installation.  Now I've just installed
> DJGPP 2.0, and find the following program doesn't compile:
> 
> #include <iostream.h>
> 
> .......


make sure you are using the -c switch when you compile and link using
gxx.
i.e.

src.cc [or] src.cpp

gcc -c src.cc -o src.o
[then if all goes well...]
gxx -o src.exe src.o

That is the proper way to compile and link a C++ program.


Check out the readme.1st file provided with the distibution. It has a
simple example of this.

-SC

- Raw text -


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