Re: Is it possible to compare size for exe file and lib on different OS


One lib on the system where MS Windows XP SP 2 is running was 4862 112 bytes
big and
the same source that was build into a lib was on the system where Microsoft
Windows Server 2003 R2 4859 154 bytes big.
So the lib differs with 2958 bytes.

Note that all the source code that is used for the library was copied from
MS Windows XP SP 2 to Microsoft Windows Server 2003 R2 so
the source code is identical.

Now to my querstion again. If the source code is abolutely identical because
I copy the code from one system to the other.
What requirement must exist to have the library the same size.
I use the same project in Visual studio for the two systems.


"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> skrev i meddelandet
Certainly they can be different sizes. The question is, what ARE the
differences? Vague
descriptions like "they are different sizes" convey no useful information.
If you said,
instead, that the files were k bytes and m bytes, then it might be easily
explained by
things like the use of __DATE__, __TIME__ and __TIMESTAMP__. If you said
that the files
were on identical directory structures with identical names, and you
examined the file
conents, and saw what was in them, you might discover that it is the
length of the string
for __FILE__.

Also, references to library files would require that the compiler install
be identical on
both machines.

You have given no useful information by which any analysis can be done.

Unless it is source code in *identical* directory names, and is compiled
at *exactly* the
same second, there is no guarantee that the contents are going to be

You are surprised the files are different sizes. I would be surprised if
they were the
*same* size.

On Mon, 7 Apr 2008 08:28:38 +0200, "Tony" <johansson.andersson@xxxxxxxxx>


I have one system that runs Microsoft Windows Server 2003 R2 and one
that runs Microsoft Windows XP SP 2.

I use Visual Studio 6.0 and MFC.

The application contains of many cpp files and h files. The application
build some lib files which is used when the exe files is being built.

If I build these LIBs and exe files on Microsoft Windows XP SP 2 and note
the size for the exe files and the lib.

I then copy all the source file into the Microsoft Windows Server 2003 R2
and then build the lib files and the exe files.

So note I now have exactly the same source files(cpp and h.) on these two

If I now compare the exe files that have been built on these two system I
can see that some exe files
are different in size.

If I also compare the lib that is used to build the exe files I can see
every lib is different in size.

So my question is the following can somebody explain why the same source
code will produce different size for lib and exe files when having
different operation OS..

The application works on both system so there is no problem with the exe
files or lib files.


Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
MVP Tips: