Mail Archives: djgpp/1996/02/08/20:42:10
At 06:36 PM 2/7/96 -0500, you wrote:
> Date: Wed, 7 Feb 1996 16:20:14 CST (-0600)
> From: cameronbuschardt <c027319 AT email4 DOT starnetinc DOT com>
>
> At 02:49 PM 2/7/96 -0500, you wrote:
> Thanx.. and one more question how come :
> ..
> long variable[1000000];
>
> main()
> {
> ...
> }
> creates a 4mb exe!? is there a way to avoid this?
> and how come
> ..
> main()
> {
> long variable [1000000];
> }
>
> Gives me a runtime error? is it a bug?
>
<STUFF REMOVED>
>
> My command line was "GCC file.cc libgpp.a" and a couple of other libs..
> And I am using v2 official release...
>
>AHA! If you name a library like that (rather than in a '-l' option) the entire
>library gets included in the executable! There is where your 1MB .exe comes
>from! With the '-l' option the linker searches the library for required
>symbols only yielding a MUCH smaller .exe. Also unlike commercial DOS
>compilers, GCC follows the UNIX standard and if no '-o' option is present
>produces an executable called "a.out".
>
>Try:
>
>gcc -o file file.cc -lgpp
>
>--
>Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
>
>A proverb is no proverb to you 'till life has illustrated it. -- John Keats
>
I think I just found one minster of a bug...
try:
main.cc
#include <iostream.h>
int largvar[1000000]
main()
{
return 0;
}
then compile via: GCC -o main.cc -lgpp: it deletes main.cc!!????
then try gcc main.cc with any params and it make a 2-4mb exe!!!
This bug only appears on IBMs (and it is on the latest release.
- Raw text -