Question

My team and I are developing a VC++ 6 project. We are all using the same code-base (using version control system), and all our compiler/linker/environment-settings (including include directories order), as far as we can tell, are exactly the same. Of course we are using the same VC++ version with the same service packs (VC6 SP6).

The problem is that the EXE that each one of us build is a little bit different.

I know that every time you build an EXE on the same computer, there are 3 locations in the file where the linker stores a time-stamp. I'm not talking about these differences.

Though our EXE files are exactly the same length, when we compare the EXEs, there are 1000's of bytes that differs. Many of those bytes differs by 0x20 in value.

Any idea what may be the reason?

Edit: Debug build (Actually, We didn't check the release).

Edit: The differences are in binary sections, not in text-strings.

Edit: All of the developers are using the same drive/folder names, for source and for products.

Was it helpful?

Solution

If Debug version has the option "Link incrementally" checked, then probably it's the reason for the diffs.

OTHER TIPS

Since 0x20 is the difference between upper and lower case ASCII characters I wonder if these differences happen to be in file paths that the compiler/linker embed in the binary (assert messages perhaps?). Could your dev trees be different ("C:\DevTrees\MyProject\SuperFoo" on one box and "E:\work\projects\superfoo" on another?).

I agree with what NickD says. During debug, incremental linking is on which doesn't rebuild the exe from scratch, but appends/inserts/removes code here and there for each build.

I.e. the layout of the exe depends on every compilation since the first.

A clean build should yield identical results on identical compilers.

It might be coincidence, but 0x20 is the difference between the values of lower-case and upper-case ASCII characters (eg 'A' == 65 == 0x41, 'a' == 97 = 0x61).

Just a guess: uninitialized parts of strings or string properties of a certain length where the #0 is not at the end ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top