delorie.com/archives/browse.cgi | search |
From: | "Marp" <marp AT 0 DOT 0 DOT 0 DOT 0> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Undefined Reference to "cout" in Hello.cpp |
Date: | Wed, 25 Oct 2000 00:58:09 -0400 |
Organization: | MindSpring Enterprises |
Lines: | 24 |
Message-ID: | <8t5p6m$ct4$1@slb6.atl.mindspring.net> |
References: | <2docvs0a8bp654oqaopnpkaen68blh8s61 AT 4ax DOT com> |
NNTP-Posting-Host: | 04.30.99.83 |
X-Server-Date: | 25 Oct 2000 04:56:54 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"demibee" <demibee AT post DOT com> wrote in message news:2docvs0a8bp654oqaopnpkaen68blh8s61 AT 4ax DOT com... > I've been using DJGPP as a backup C/C++ compiler for a year or so. > Last night I downloaded the most recent ZIPs for use in DOS. I'm > finding that I have no trouble with C programs. C++ is a different > story. Using... > > C:\> gcc hello.cpp -o hello.exe > <snip> > undefined reference to "cout" > undefined reference to "endl" This is a linker error. You must link in the C++ library by adding -lstdcxx to the end of the command line. Alternatively you can use gxx instead of gcc. Hope this helps. Marp
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |