delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/30/10:59:57

From: "Chris Hunt" <chris_hunt1 AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <37C61861 DOT 832BAEDF AT asan DOT com>
Subject: Re: getting gcc to work with C++ classes
Lines: 31
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <ZNmy3.640$Z87.2292296@news.bctel.net>
Date: Sun, 29 Aug 1999 20:18:15 -0700
NNTP-Posting-Host: 209.53.246.114
X-Complaints-To: news AT bctel DOT net
X-Trace: news.bctel.net 935983353 209.53.246.114 (Sun, 29 Aug 1999 20:22:33 PDT)
NNTP-Posting-Date: Sun, 29 Aug 1999 20:22:33 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I had the same problem under Win95 - check the FAQ under _8.7 Unresolved
Externals when Linking Programs_ -- you need to specify the library to link
to link to (ie.: add -lstdcxx at the end of your gcc command)

Chris Hunt

G Jaye wrote in message <37C61861 DOT 832BAEDF AT asan DOT com>...
>I'm a teacher and many of my C++ students will have Win98 systems. To
>that end, I just installed GNU's package (using its Win 9x hard disk
>installation program) on my Win98 system's E drive, and everything seems
>pretty well-behaved except the C++ aspect of the DJGPP gcc compiler, ver
>2.7.2. (C works just fine!) Consider the statement below, given the
>directive #include <iostream.h> and source file extensions cc, cpp, and
>cxx (I tried all 3).
>
>   cout << "Hello world\n";
>
>The 2 error messages this produces are:
>1. undefined reference to 'cout'
>2. undefined reference to 'ostream::operator<<(chr const *)
>
>Clearly iostream.h is being found or the 2 error messages wouldn't
>occur. Yet it doesn't seem to do any good. The only copy of iostream.h
>is in the E:\fsf\lang\cxx directory. Attempts to use the C++ string
>class declared in <string> fare no better. Am I better off re-installing
>from the DJGPP web site or elsewhere? Hoping somebody can get tell me
>how to resolve this before Sept 9!!!Thanks...
>
>gary jaye


- Raw text -


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