473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Same code build twice => diff binary

Hi all,

I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088)
and I noticed that by building the exact same code twice the generated
binaries are different (not much, but they are). To be sure I tried a
simple console application like void main(){} and 2 times rebuilding the
project gets 2 different binaries.

Has anybody any clue why this happens?
Could I somehow change a setting or something to remove those diff (I
mean from the same code to get identical binaries)?

Thanks in advance,
Viv
Nov 22 '05 #1
4 2090

"Viviana Vc" <vc*******@hotmail.com> wrote in message
news:2i************@uni-berlin.de...
Hi all,

I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088)
and I noticed that by building the exact same code twice the generated
binaries are different (not much, but they are). To be sure I tried a
simple console application like void main(){} and 2 times rebuilding the
project gets 2 different binaries.

Has anybody any clue why this happens?
Could I somehow change a setting or something to remove those diff (I
mean from the same code to get identical binaries)?

Thanks in advance,
Viv


void main(){} is undefined bahaviour therefore the compiler is free to do
what it wants. Vey unlikely this is the cause however. I am not sure about
the format of an exe, but could it be the timestamps that are causing them
to be different?
Allan
Nov 22 '05 #2
I found the following article:
http://support.microsoft.com/default...b;en-us;164151
which tells that indeed the timestamp is the diff, but I couldn't find
in VC++ IDE any setting to disable the timepstamp stuff, and I assume
this should be somehow doable.

Thx,
Viv

On Sat, 05 Jun 2004 14:55:45 +0200, Viviana Vc <vc*******@hotmail.com>
wrote :
Hi all,

I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088)
and I noticed that by building the exact same code twice the generated
binaries are different (not much, but they are). To be sure I tried a
simple console application like void main(){} and 2 times rebuilding the
project gets 2 different binaries.

Has anybody any clue why this happens?
Could I somehow change a setting or something to remove those diff (I
mean from the same code to get identical binaries)?

Thanks in advance,
Viv


Nov 22 '05 #3
Hi, Viviana

depending on settings you can get different timestamps and versions in
binaries. Which will cause different hashes and some other fields - don't
remember now exactly wich ones. If you are really interested - check PE
format description for .Net assemblies on MSDN.

HTH
Alex

"Viviana Vc" <vc*******@hotmail.com> wrote in message
news:2i************@uni-berlin.de...
Hi all,

I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088)
and I noticed that by building the exact same code twice the generated
binaries are different (not much, but they are). To be sure I tried a
simple console application like void main(){} and 2 times rebuilding the
project gets 2 different binaries.

Has anybody any clue why this happens?
Could I somehow change a setting or something to remove those diff (I
mean from the same code to get identical binaries)?

Thanks in advance,
Viv

Nov 22 '05 #4
Viviana Vc wrote:
I am using Win2k, VS. NET 7.1 (MS development Environment 2003
7.1.3088) and I noticed that by building the exact same code twice the
generated binaries are different (not much, but they are). To be sure
I tried a simple console application like void main(){} and 2 times
rebuilding the project gets 2 different binaries.

Has anybody any clue why this happens?
At least the time-stamp is different.
Could I somehow change a setting or something to remove those diff (I
mean from the same code to get identical binaries)?


In general: No. You can change the timestamp "by hand".
For more info see:
Microsoft Portable Executable and Common Object File Format
Specification
http://www.microsoft.com/whdc/system...re/PECOFF.mspx
It was already discussed several times in some newsgroups; see for
example:
http://groups.google.de/groups?&thre...%40tkmsftngp04
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Viviana Vc | last post by:
Hi all, I am using Win2k, VS. NET 7.1 (MS development Environment 2003 7.1.3088) and I noticed that by building the exact same code twice the generated binaries are different (not much, but they...
6
by: | last post by:
I am rewriting a C++ application in C#. This file has a combination of Text and Binary data. I used CFile before to read the text. If I hit a certain string that denotes the following data is...
2
by: Martin Klaffenboeck | last post by:
Hello! I have 2 queries: The {..} are precalculated values. At the beginning no item can be matched by both where clauses. 1) update tabelle set L = L + {MOVE}
9
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the...
3
by: GT | last post by:
I have a .NET client that consumes an Axis web service. A change was made recently to the AXIS web service, and ever since then my .NET proxy class has been throwing an InvalidCastException. The...
1
by: Stef Mientki | last post by:
Does anyone know the equivalent of the MatLab "diff" function. The "diff" functions calculates the difference between 2 succeeding elements of an array. I need to detect (fast) the falling edge of...
13
by: Steven Bethard | last post by:
Jean-Paul Calderone <exarkun@divmod.comwrote: Interesting. Could you give a few illustrations of this? (I didn't run into the same problem at all, so I'm curious.) Steve
7
by: John Nagle | last post by:
Back in March, I posted this: That was for M2Crypto 0.17. It's still broken in M2Crypto 0.18. And there's no RPM or Windows binary. Nobody actually uses this stuff, do they?
7
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out...
27
by: Dave | last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU compilers. I then decided to try to use Sun's compiler. The Sun Studio 12 compiler reports the following code, which is in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.