delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/29/05:39:14

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: C++ won't work!
Date: Mon, 28 Oct 1996 20:52:13 -0800
Organization: Alcyone Systems
Lines: 19
Message-ID: <32758D7D.4EF28B3E@alcyone.com>
References: <3274ED56 DOT 6761 AT dur DOT ac DOT uk>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Greeny wrote:

> Whenever, I try and use GCC to compile C++ programs, it doesn't find the
> libraries and compile correctly. eg. It will not recognise cout and
> gives me an error. What am I doing wrong?

This has to be by far and away the most common frequently-asked DJGPP
question.

The answer is that you're not linking in the appropriate C++ libraries.
Put -liostream on the link line (before the -o argument) or use gxx instead
of gcc.

-- 
                             Erik Max Francis | max AT alcyone DOT com
                              Alcyone Systems | http://www.alcyone.com/max/
                         San Jose, California | 37 20 07 N 121 53 38 W
                                 &tSftDotIotE | R^4: the 4th R is respect
         "But since when can wounded eyes see | If we weren't who we were"

- Raw text -


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