delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/19/23:07:09

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: really simple compiler question, please help :)
Date: Thu, 19 Jun 1997 15:38:21 -0400
Organization: Cornell University http://www.cornell.edu
Lines: 52
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <33A98AAD.73A@cornell.edu>
References: <33A95FD6 DOT 7E5A AT tribune DOT com>
Reply-To: asu1 AT cornell DOT edu
NNTP-Posting-Host: cu-dialup-0020.cit.cornell.edu
Mime-Version: 1.0
CC: rob DOT den DOT boer AT derijke DOT nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gerritt Baer wrote:
> 
> I just installed djgpp and when compiling an EXTREMELY simple program
> like so :
> 
> #include <iostream.h>
> 
> void main()

you mean int main(void), right. well, ok it's c++ so you can get away
with int main(). there you just saved a keystroke.

> I get a 187k executable even when using the -O option.  am I using the
> wrong thing to compile with?  I do a

-O option does not really have anything to do with size. read about it
in the docs by typing 

info gcc invoking optimize

> 
> gxx -O -o blah.exe blah.cpp
> 
> gcc doesnt work at all

you need to link the io streams library explicitly or use gxx. this is
in README.1ST.

> it cant find the iostream.h library for some

that is a header file. it will find the header no problem. it does need
to be told to link the library. again, read README.1ST.

read the FAQ or the mailing archives regarding questions on the size.

>I usually cant find my origianal thread on usenet.

hmmmm. does that say something about missing README.1ST/FAQ?

anyway, e-mailed and posted. however, try to keep your responses to the
newsgroup.
-- 
   Sinan
 
*******************************************************************
 A. Sinan Unur                                WWWWWW
                                              |--O+O
 mailto:sinan DOT unur AT cornell DOT edu                C   ^ 
 http://www.people.cornell.edu/pages/asu1/     \  ~/ 

Unsolicited e-mail is _not_ welcome, and will be billed for.
*******************************************************************

- Raw text -


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