delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/05/07/10:30:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Thomas8675309 AT yahoo DOT com (Tom)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJPGG and Windows XP Professional + I think a Undefined Reference or linker problem
Date: 7 May 2004 07:22:31 -0700
Organization: http://groups.google.com
Lines: 44
Message-ID: <7b68d58f.0405070622.2494fe7f@posting.google.com>
References: <409a71b4_1 AT mk-nntp-2 DOT news DOT uk DOT tiscali DOT com>
NNTP-Posting-Host: 63.72.148.162
X-Trace: posting.google.com 1083939752 8432 127.0.0.1 (7 May 2004 14:22:32 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Fri, 7 May 2004 14:22:32 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"wordsworth" <news AT callera DOT net> wrote:

> I was working though Steves Heller (excellent book) Learning to Program C++
> which uses code provided and DJGPP compiler, contained on the CD.  I have
> come back to this book after sometime and was setting the compiler up on my
> current Windows XP Professional PC.  It worked a few years ago when I was
> running Win98 but not now.

Your book is WAY out of date.

> you will see below the results - a warning is given about depreciated
> headers which can be suppressed with "-Wno-deprecated" being added but the
> test.cc will not compile. 

The fact that your book tells you to use deprecated headers shows how
out of date it is.
> 
> ================================================================
> test.cc (as you can see a simple test prog)
> ================================================================
> #include <iostream.h>
> 
> int main()
> {
> cout << "Hello World!" << endl;
> }

Try this instead:

// test2.cc
#include <iostream>
int main()
{
  std::cout << "Hello World!" << std::endl;
}

gpp test2.cc -Wall -W -pedantic -o test2.exe

Get yourself an up-to-date book.  One of the better ones is
Accelerated C++ by Koenig and Moo.

Best regards,

Tom

- Raw text -


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