Mail Archives: djgpp/1997/11/13/13:37:39
"Aaron J. Barnes" <barspin AT ime DOT net> 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
- Raw text -