Re: Building EXE Twice Produces Different Files

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"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-increment
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
start
but throughout.

How can I be sure that the executable code is the same in the two EXEs,
and
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


.



Relevant Pages

  • Re: Looking for a free basic compiler for DOS
    ... BC for 7.1 had a lot of compiler switchable options, ... NEVER compile from the ide. ... One trivial example: I have a routine declared as: ... were no manuals, just a readme file. ...
    (comp.lang.basic.misc)
  • Re: HPGCC Questions ladies and gentlemen!!!
    ... free compiler to learn C today I would choose MS Visual C++ Express ... ANSI C has been deprecated but it's still there and the IDE ... Create the program with your favourite text editor, call it, say, hello.c ... Project management is nothing exclusive to IDE's -- there are many ...
    (comp.sys.hp48)
  • "Good" versus "bad" IDEs. Re: BlackBox version 1.4 or 1.5Beta?
    ... why I believe the System 3 IDE is superior to TP 3.0. ... I don't want a list of compiler errors [as a demonstration ... > I DO want the first error to be shown immediately/automatically ... TP and Oberon, but I forget how the compiler I used ...
    (comp.lang.oberon)
  • Re: HPGCC Questions ladies and gentlemen!!!
    ... Frank Pittel wrote: ... free compiler to learn C today I would choose MS Visual C++ Express ... ANSI C has been deprecated but it's still there and the IDE ... Create the program with your favourite text editor, call it, say, hello.c ...
    (comp.sys.hp48)
  • Re: newbie question: creating my first mex-file - compiling on windows xp
    ... There is a PDF file available at the Matworks site. ... > I found something with google called "Connecting C and matlab" 4 pages. ... >> IDE you will almost certainly find it easier to learn C there. ... I'd go with the compiler with the best IDE ...
    (comp.soft-sys.matlab)