www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/19/00:28:03

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3906
Path: news-dnh.mv.net!mv!barney.gvi.net!redstone.interpath.net!news.sprintlink.net!newsfeed.internetmci.com!swrinde!sgigate.sgi.com!genmagic!goonsquad.spies.com!uuwest!alcyone!max
From: max AT alcyone DOT darkside DOT com (Erik Max Francis)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: C++ - Almost there
Message-ID: <o2P6FD1w200w@alcyone.darkside.com>
Date: Fri, 15 Dec 95 07:25:47 PST
References: <4aj0hm$g70 AT micro DOT internexus DOT net>
Organization: &tSftDotIotE
Lines: 32
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

master AT micro DOT internexus DOT net (Laszlo Vecsey) writes:

> Using 'cpp.exe hello.cpp -o hello.exe' it now compiles cleanly,
> but I guess I still need to link in some libs before this is truely an exe.
> How do I do this?
> 
> Running 'gcc hello.cpp -o hello.exe' spits back errors about cout being 
> undefined. 
> hello.cpp simply contains an include of #iostream.h and a cout 
> of "Hello World". stdio.h and printf (ANSI C) work just fine, but DJGPP
> is useless to me unless I can use C++.

Link in the iostream library:

    gcc hello.cpp -liostream -o hello.cof

Note that what gcc makes under DJGPP is not an exceutable; it is a 
COFF file.  To run the COFF file, type

    go32 hello.cof

To convert the COFF to a DOS executable, type

    coff2exe hello.cof


Erik Max Francis, &tSftDotIotE && uuwest!alcyone!max, max AT alcyone DOT darkside DOT com
San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
_Omnia quia sunt, lumina sunt._ && GIGO Omega Psi && http://www.spies.com/max/
"The Creator Raven looked at Man and was . . . surprised to find that this
strange new being was so much like himself."           -- Eskimo creation myth

- Raw text -


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