Re: Dependency .CPP --> .OBJ broken

Tech-Archive recommends: Speed Up your PC by fixing your registry



chanceu wrote:
I'm using VS 6.0. I have narrowed my problem down to .C files and the compiler (cl.exe). At a command prompt, I created a .C file and a .CPP file, compiled both, and objects were created for both. I then changed 1 byte (0 to a 1 in a string) in the .C and .CPP files and recompiled without deleting the objects. The .CPP file compiled and the object reflected the new time. The .C did not appear to compile as the object time did not change.

HOWEVER, after a closer look, I noticed the file last accessed time did change and comparing the object fromt the first compile to the object from the second file (fc /b), I could see the byte I changed so the object was built. I am not sure what is happening. After the second compile, the .CPP object has the original creation time and new modified and last accessed times, the .C object only has a new last accessed time. Even though the object is built for the .C file, the link does not include it because the incremental link does not see a need to since the modified time did not change.

I have no f****** idea what is going on and Microsoft refuses to help since I am apparently the only person in the world that still uses VS 6.0.

If you want a workaround (rather than a solution), can you add a post-build step for the problematic .C file that touches the .obj file to update the modification time? If you don't have a touch program, you can get one from http://unxutils.sourceforge.net ...
.



Relevant Pages

  • RE: eVc4 SP4 and STL error : Lockit
    ... There is no way to do it without including the CPP file. ... compiled version of the source in order for the linker to have something to ... Subject: eVc4 SP4 and STL error: Lockit ... > I've got some problems to compile a release version of a program... ...
    (microsoft.public.pocketpc.developer)
  • Re: CFormView adding GetDocument() functionality results in error C2143: syntax error : missing ; be
    ... That is caused by the order of includes in the cpp file. ... > I noticed Document and Debug support missing from the class, ... I get a compile error: ... > I don't understand why it can't compile if the ...
    (microsoft.public.vc.mfc)
  • Re: fatal error C1083: Cannot open include file: stdafx.h: No such file or directory
    ... I did some googling and it seems like that "stdafx.h" has something to do with pre-compiled headers, so I've also tried the different options under pre-compiled headers in the prject properties, but still get the same error. ... How can I get this .CPP to compile cleanly under VS2008? ... Since I created a VS project from the ..CPP file, as Richard pointed out, VS doesn't automatically create the stdafx.h. ... Being relatively new to VS, I couldn't tell "what kind" of stdafx.h was needed, so what I did was try to to create console apps in VS with various options, until I found one that created an stdafx.h. ...
    (microsoft.public.vstudio.general)
  • Re: question about extern ?..
    ... > also program compiles and runs fine with x declared as extern. ... > So is it necessary to declare x as extern if one get away without ... let's say you have a CPP file as so: ... In this case, you won't get a compile error at all, but a Link errror, the ...
    (comp.lang.cpp)
  • Re: Header Files Dependency Ignored in Command Line Build
    ... the expected behavior and is exactly what I want. ... when using the same exact .vcproj file to compile the project ... vcbuild simply ignores any such change. ... It will compile a .cpp file ...
    (microsoft.public.vstudio.development)