Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: "Aaron J. Barnes" , djgpp AT delorie DOT com Date: Thu, 13 Nov 1997 15:50:06 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: question regarding executable size and linking Precedence: bulk "Aaron J. Barnes" wrote: > I realize that this problem is due to my own ignorance, but if anyone would > be willing to give me a solution it would be greatly appreciated. > > When I compile a simple "Hello, World!" program with DJGPP (gcc) I get the > following error (running under Win95 / DOS): > > gcc.exe: Compilation of header file requested Waw! GCC is very cleaver! > This is the command line I am using: > > gcc hello.cpp -o hello.exe -liostream.h Because you can't say that a library is a header!!!! try with the library (iostr in my system). That's -liostr > I tried the following, which *does* create an executable, but at well over > 180K: > > gcc hello.cpp -o hello.exe -lstdcx > > The latter is the exact command line that is used when you make and > executable from within RHIDE. > > So, my question is: how is it possible to simply link a single file (i.e. > iostream.h). Thanks much in advance. The linker is linking the necesary things, not the whole library. try: gcc -s hello.cpp -o hello.exe -lstdcx If the size still huge for you download mlp105b.zip and compress it. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013