?
Solved

How do you verify a build in C++ Builder 4

Posted on 2000-03-07
8
Medium Priority
?
184 Views
Last Modified: 2010-04-02
Hi, I recently did some development in Borland C++ 4.0.  I need to be able to duplicate a build of my software; in order to do that I create two executables and then run the dos command "fc /b" on both files.  There are differences even when I build two executables from the exact same code.  The address ranges for the differences are:

208-209,
438-5FF,
F604-F7C3,
100B0-11E54

Can you point me to where I could find out what is in those ranges so that I can explain away the differences in the executable files.  Any information would be appreciated.  Thanks,

dan
0
Comment
Question by:danharms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2592778
>> Can you point me to where I could find out what is in those ranges
The first 1 or 2 might be in the EXE header so it might be possible for those, but the others are in the program code itself so that is not possible--without the code.

Did you do a complete rebuild (I think BCB calls it build all) where it rebuild all files from scratch rather than doing incrimental compilation and incrimental linking.  Incrimental compilation/linking could account for differences.
0
 

Author Comment

by:danharms
ID: 2592799
Yes I did do a complete rebuild.  What is the strangest to me is that I can do a build, wait a couple minutes and do another build and I will get differences in the same ranges.  I can't find any reference info. to find out what Builder puts at different addresses.
thanks
0
 
LVL 22

Expert Comment

by:nietod
ID: 2592846
the compilation date and time may be embedded in the header or other places and would account for some differences.

>> I can't find any reference info. to find out
>> what Builder puts at different addresses
Of course not.  It depends on the code.  Each EXE begins with a standard header, I can get you a format for that, but after that it varies depending the code you are compiling.  (Actually the header itself will vary from program to program, buit it has a well-defined format.)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:danharms
ID: 2592913
Since it is completely dependant on the code I'm compiling.  Why does the structure of the EXE change when I compile the same code two different times?  
0
 

Author Comment

by:danharms
ID: 2592945
Since it is completely dependant on the code I'm compiling.  Why does the structure of the EXE change when I compile the same code two different times?  
0
 
LVL 22

Expert Comment

by:nietod
ID: 2592999
The only thing I can think of is embedded times+dates and possibly incremental compilation/linking.  Without incremental compilation/linking I would expect the program to be always identical, except maybe for a few bytes in the header that might have data/time info.

I'm not sure why there might be other differences.

Well, one thing is that the program consists of different segments, like a code segment and an data segment.  When loaded into memory these segments must start at page boundaries and must be integer multiples of page lengths in size.  It is possible that the compler/linker may pad these segments so that they start at page bondaries or have lengths that are integer multiples of page lengths when in the EXE.  If so, the padding is likely to be "garbage" adn vary from time to time.  Purely a guess.

If you are interested in the EXE format look at

http://www.wotsit.org/search.asp?section=binary

There are several entries for windows EXE formats.  Look for the ones for the NT or PE (portable executable) formats.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2613473
You don't happen to have any auto version build macros running do you. I always forget to turn mine off when I am recompliing old code to trace a bug
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 225 total points
ID: 2650537
I tested it for BC 3/4/5. Sometimes i get other size of exe file for same obj files! But module works same. Result:
Only Borland knows true reason of this,
but it is not important. That is, that important: you module works absolutele
same :not depending from size and structure of exe file!
Alex
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question