Re: including a large constants file
From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 01/10/05
- Previous message: Mike Wahler: "Re: size_t and int comparison"
- In reply to: john smith: "including a large constants file"
- Next in thread: Mike Wahler: "Re: (P.S.) including a large constants file"
- Reply: Mike Wahler: "Re: (P.S.) including a large constants file"
- Reply: E. Robert Tisdale: "Re: including a large constants file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 10 Jan 2005 02:21:00 GMT
"john smith" <princetonharvard@charter.net> wrote in message
news:2hlEd.14685$5E4.13879@fe03.lga...
> Hi,
>
> If I have a large constants file and include that in a .cpp file will the
> executable become large?
Define 'large'.
>
> That is if I include a file with a bunch of constants does the executable
> include all of the constants or just
> the constants that are used in the .cpp file?
That depends entirely upon your compiler and platform.
>
> I am wanting a way so that only the constants that are used are included
in
> the executable and not the whole file.
Again this depends upon your compiler, and also upon the
context in which they're used. Some might be stored in
your program's image, some might become 'immediate' operands
of machine instructions.
> I am trying to reduce the size of my executable.
None of what you ask is addressed by the language, so
we cannot answer conclusively.
>
> I had trouble verifying this.
>
> Thanks alot for any advice.
Consult your compiler documentation, and/or search your
compiler's support resources.
-Mike
- Previous message: Mike Wahler: "Re: size_t and int comparison"
- In reply to: john smith: "including a large constants file"
- Next in thread: Mike Wahler: "Re: (P.S.) including a large constants file"
- Reply: Mike Wahler: "Re: (P.S.) including a large constants file"
- Reply: E. Robert Tisdale: "Re: including a large constants file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|