cl.exe Difference in object files when /E output is the same and flags are the same

Posted by madiyaan damha on Stack Overflow See other posts from Stack Overflow or by madiyaan damha
Published on 2009-06-15T21:10:24Z Indexed on 2010/05/10 12:04 UTC
Read the original article Hit count: 385

Filed under:
|
|
|

Hello:

I am using Visual Studio 2005's cl.exe compiler. I call it with a bunch of /I /D and some compilation/optimization flags (example: /Ehsc).

I have two compilation scripts, and both differ only in the /I flags (include directories are different). All other flags are the same. These scripts produce different object files (and not just a timestamp difference as noted below). The strange thing is that the /E output of both scripts is the same. That means that the include files are not causing the difference in object files, but then again, where is the difference coming from?

Can anyone elucidate on how I am seeing two different object files in my situation. If the include files are causing the difference, how come I see identical /E output?

PS. The object files are different not only in the timestamp, but in the code sections also. In fact the behavior of my final executable is different in both cases.

Edit: PSS: I even looked at the /includeFiles output of cl.exe and that output is identical. The object files, however, differ in more than just the timestamp (in fact, one is 1KB bigger than another!)

© Stack Overflow or respective owner

Related posts about cl.exe

Related posts about include