delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/08/10:19:54

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Compiling c++ programs
Date: Mon, 08 Dec 1997 21:59:37 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 35
Message-ID: <348C6DC9.6F02@cs.com>
References: <01bd034e$2ad868c0$3551e0c7 AT javalon>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp211.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Avallone wrote:
> 
> OK, I got DGJPP and I got the c++ libraries, and I've gone through the faq.
> What I can't figure out is how in the world I compile a c++ program.

It tells you in 'readme.1st'.  Either in one stage:

  gcc myprog.cpp -o myprog.exe -lgpp

  or, more simply:

  gxx myprog.cpp -o myprog.exe

or in two stages:

  gcc -c myprog.cpp
  gcc -o myprog.exe myprog.o -lgpp

  similarly:

  gcc -c myprog.cpp
  gxx -o myprog.exe myprog.o

You just need to link the libraries.  Case is also important.  The FAQ
covers this topic in chapter 8.7.

hth

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Always listen to experts.  They'll  |
|       aka Fighteer I       | tell you what can't be done, and why.|
|   mailto:fighteer AT cs DOT com   | Then do it."                         |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


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