| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Organizing source code |
From: "Gregg N"
"Geo" wrote in message
news:417e1e47$1{at}w3.nls.net...
> "Gregg N" wrote in message
> news:417d88b4$1{at}w3.nls.net...
>
>> The more useful test is how much additional space is taken up
>> incrementally as you add new code. The baseline size doesn't
>> tell you much except that the I/O facility takes about 190k.
>> This is not a function so much of the language as it is of
>> the granularity of the library that gets linked in.
>
> I kinda figured it was the includes (what else could it be).
Including a header actually doesn't generally cause any additional code to
get linked in unless you are actually using something declared in the
header.
>> When I compiled your sample with /MD the executable was only
>> 3,584 bytes. This tells the compiler not to statically link
>> the runtime library, but to use msvcrt dll instead. I also
>> specified /O1 which is optimize for size.
>
> Oh cool, now this is interesting, these switches are a part of
> the standard vc++ compiler options?
Yes. If you're using the IDE instead of the command line, you have to find
the corresponding check boxes under your project properties. Also make sure
you distinguish between "debug" builds and "release"
builds, which are the two default collections of compiler/linker settings
for the IDE. By default, the debug build will produce larger code with
embedded debug information.
If you want to compile from the command line, you have to set a bunch of
environment variables first. There is a batch file in the Visual Studio
tree named vcvars32.cmd that does this for you. Just create a shortcut to
it somewhere.
Gregg
--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)SEEN-BY: 633/267 270 5030/786 @PATH: 379/45 1 396/45 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.