mfc >> VC++ Question - obj file

by Kelly C. » Sun, 23 Nov 2003 03:21:07 GMT

This is a VC++ question ...

I used "cl.exe" to build a hello world program, the object file and the exe
file are different every time for the same source code ("fc" command was
used to comparisons). Why is that?

Thanks.




mfc >> VC++ Question - obj file

by Kelly C. » Sun, 23 Nov 2003 08:09:55 GMT


My test program has just these lines:

#include <iostream.h>
int main()
{
cout << "hello, world!";
return 0;
}

===========
To demonstrate the test using VC++ 6.0:

cl /Fetest1.exe test.cpp
cl /Fetest2.exe test.cpp

fc test1.exe test2.exe











mfc >> VC++ Question - obj file

by Joseph M. Newcomer » Sun, 23 Nov 2003 17:15:41 GMT

(a) that is a silly thing to do. There is a nice IDE that makes it unnecessary to
explictly run cl.exe
(b) why do you care?
(c) it is probably some internal timestamp. (This assumes you have invoked it identically
each time you invoke it)

[There are some things in the world that are completely unworthy of worrying about. I've
been programming with Microsoft compilers for on the order of 20 years and it never once
occurred to me that there would be any value in comparing the object files or executables
for two identical runs. And I'm still not sure why there would be any value)
joe




Joseph M. Newcomer [MVP]
email: XXXX@XXXXX.COM
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm


VC++ Question - obj file

by Mihajlo Cvetanovic » Sun, 23 Nov 2003 17:35:10 GMT




Time stamps inside exes...




VC++ Question - obj file

by Adrian Kole » Tue, 25 Nov 2003 03:23:24 GMT

I have run into this same exact problem before. IIRC, this didn't always
used to be the case; I think the compiler did indeed generate identical
object/executable code for any run.



unnecessary to

Sometimes it makes sense to provide a simple make file as it is a quick way
of 1) ensuring the exact commands used and 2) to communicate to someone else
the exact procedure without providing a project file.


When ensuring quality of an application, it can sometimes be very useful to
compare the executables before and after doing things that, in theory,
should have no impact but, in reality, do. For example when making
broad-sweeping changes to macros that impact allot of files. I personally
have found this helpful. Years ago, I did this when using MASM and it
helped me identify flaws in the source code. It duplicates, to a degree,
what ASSERT() does in the code--tests an assertion that would be impractical
to do with manual intervention.

worrying about. I've
it never once
or executables
value)

Don't you think this is a little harsh, Joe?




Similar Threads

1. VC++ Question - obj file

This is a VC++ question ...

I used "cl.exe" to build a hello world program, the object file and the exe
file are different every time for the same source code ("fc" command was
used to comparisons). Why is that?

Thanks.



2. to project in eMbedded VC++(ARM) must be added '.obj' file - Windows CE

3. Sharing a single com obj between vc++ and js

Hi all,

I instantiate a COM object from VC++. Is there anyway that I can pass
this com object pointer to a javascript code so that i can access the
object through javascript

Thanx

4. Generate XML Documentation Files option causes obj files not to be created

5. Generate XML Documentation Files option causes obj files not to be created

Bruce wrote:
> I am using the Express version of VS2005
> 
> If I set Generate XML Documentation Files to yes then the xml file is
> generated but my OBJ files do not get generated.  Any idea why?
> 
> I am using the following versions:
> 
> Microsoft Visual Studio 2005
> Version 8.0.50727.762  (SP.050727-7600)
> Microsoft .NET Framework
> Version 2.0.50727
> 
> Installed Edition: VC Express
> 
> Microsoft Visual C++ 2005   76542-000-0000011-00125
> Microsoft Visual C++ 2005
> 
> 
> 

Fixed this one too.  Apparently the compiler does not like it if you 
leave the XML Documentation Filename blank.   It needs to be set to 
something such as ./.



-- 
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com

6. BDS2006: Creating obj-File from Variants.pas/pas-File -> obj-File - C++ Builder IDE

7. Remote obj method : problem accessing from VC

I have a server running,  Server has a remotable obj and a form which is
displayed

When a invoke a remote method in server, the thread is not able to access
form in the same server name space
It is even not possible to access the static methods in the server name
space,
When i tried to print the static variables in the form and in the remote
method, i got separate copies of the static variables
But this is not the case with COM,
My form main method is MTA and als my VC client is initilising com libraries
with MTA
SB


8. obj-c vs c++ vc c