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:


Relevant Pages

  • Re: How to have perl on a CD (windows)
    ... > memory stick and could run on any windows computer. ... Firstly, Tiny Perl is able to run Perl programs, say from a floppy, with ... pm files either under site/lib or lib. ... Checking the file under Tiny Perl reveals that no hash modules have ...
  • Re: Where is ?
    ... They don't say it's empty. ... >| the other directories (although lib appears to be empty). ... So just quit Windoze, and from your SCO box, use ftp (if ... Well, I'm running Windows probably 99% of the time or better, so it's ...
  • Re: Does linux have libraries/dlls?
    ... > background of Mac and some Windows. ... but if more than 1 process/program/application uses the same lib, ... the kernel will set up memory mapping to share the same memory space of the ... You may need to read up on paging and virtual memory to get this. ...
  • Re: DLL library not opening!
    ... The Windows directory. ... Note that VB loads the lib module for a declared function the ... Another way is to use the API to explicitly load the dll ... your lib function VB will request it be loaded again, ...
  • Re: Cloning FASLD
    ... why fasld_lib is a LIBRARY and not a DLL? ... If I create a DLL that uses my cloned lib, I want that all the components ... If you are about to change the source code you need to clone ... convert it from a lib to a driver dll or you keep ...