delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/23/21:17:39

From: student AT nottingham DOT ac DOT uk
Newsgroups: comp.os.msdos.djgpp
Subject: Massive c++ execs.
Date: 21 Oct 1997 16:38:00 GMT
Organization: University of Nottingham
Lines: 26
Message-ID: <62ilp8$mkk@paperboy.ccc.nottingham.ac.uk>
NNTP-Posting-Host: wcc3g5.nottingham.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi there. Could anyone tell me why, when I compile a 123 byte c++ program
with the GNU compiler, I get a 200k+ executable?
 This is the test code:

 #include <iostream.h>
 #include <conio.h>

 void main()
 {

  cout << "Hi there!!\n";
  getch();
  // test comment

 }

This is the command line to compile it :

 gcc -v main.cc -o testcpp.exe -lgpp

200K+ to print a single line and wait for a key seems very odd to me.
 Am I doing some thing wrong, or does gcc add in extra unneccessary
libraries?
 I am grateful for any info on this puzzling situation.

 Julian Churchill.

- Raw text -


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