Re: Building EXE Twice Produces Different Files
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 9 Nov 2006 07:25:08 -0600
"Charles Law" <blank@xxxxxxxxxxx> wrote in message
news:erMhY2$AHHA.4672@xxxxxxxxxxxxxxxxxxxxxxx
I have just built my code twice, on the same machine, with auto-incrementstart
off (I did not change the code in any way). I also did not close the IDE
between builds, but now I have two different EXE files. If I perform a hex
comparison on the files, they are quite different, and not just at the
but throughout.and
How can I be sure that the executable code is the same in the two EXEs,
if it isn't then why isn't it?
Thanks for any insights.
Charles
Are you using VB6? (Just to make sure. <g>)
This is a common phenomenon - repeatedly compiling a VB application will
produce a file of ever increasing size. (I think the increment is around 2k)
I have heard numerous explanations, some plausible, some rather incredulous.
MS did have an article on this subject but can't find it at the moment
(likely on the wayback machine somewhere). This perhaps indicates there is
no ONE source/cause for the increase.
The best explanation is that VB does some quick caching of metadata that it
includes in its 'pre-processed' object files that are submitted to the C2
compiler. It doesn't remove or compare with data already written in this
cache - so this data just gets appended. Duplicate information is ignored by
the C2 compiler, but it ends up in the finished executable.
Using a Hex editor to isolate the exact changes is difficult because as you
noted the 'increase' appears to be distributed through-out the executable.
(Due to the absence of 'lines' once a comparison gets out of synch - it
stays out of synch.)
However, AFAIK, the differences are benign. If you shut-down the IDE, open
and recompile, the executable will be squeezed back to its original size.
hth
-ralph
.
- Follow-Ups:
- Re: Building EXE Twice Produces Different Files
- From: Charles Law
- Re: Building EXE Twice Produces Different Files
- From: Ralph
- Re: Building EXE Twice Produces Different Files
- References:
- Building EXE Twice Produces Different Files
- From: Charles Law
- Building EXE Twice Produces Different Files
- Prev by Date: Re: Building EXE Twice Produces Different Files
- Next by Date: Re: PRINT FORM
- Previous by thread: Re: Building EXE Twice Produces Different Files
- Next by thread: Re: Building EXE Twice Produces Different Files
- Index(es):
Relevant Pages
|