VC++ 2005 doesnt compile, when non-startup project header is changed...

I have five projects in my solution. First four creates static lib and the fifth is exe file that uses those libs. The fifth project is set as startup and dependent to others. Whatever file (cpp, h) is changed, compilation occurres after F5 (build project) is pressed. I can also change something in cpp of the dependent project and it is also compiled. The problem are any changes in header files of dependent projects. VS just saves them, but writes: "========== Build: 0 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========" to the output window and compiles nothing. I tested this in VS2005 prof and VC2005 Express. Both have the same problem.


Answer this question

VC++ 2005 doesnt compile, when non-startup project header is changed...

  • MuradAkram

    In this case, please log a bug at http://connect.microsoft.com/site/sitehome.aspx SiteID=210

    Thanks in advance for taking the time to log the issue!

    Also, please reply back with a link to the bug.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Martin Danner

    I tried to send feedback, but I cant. On the page you post the link for, I pressed "Feedback", than "Submit Feedback", than in Step1 I tried to search something similar and found nothing so I pressed button "Submit Feedback" in Step2. But it kicks me back to the page , where the first "Submit feedback" link is [http://connect.microsoft.com/feedback/default.aspx SiteID=210] I'm logged in, of course.

  • clonk

    All headers I talk about are part of dependant projects. Yes, the rebuild really compiles all, but it takes a lot of time. I tried to turn off precompile headers, but it doesnt help. I also tried to create a simple repro case. I created win32 exe + lib in the same solution with help of wizard, but it works well in this case :(

  • devinr

    yes, it is. Everytime I run the studio, I have to change something in global include directories and save. Without it, the C++ compiler doesnt want to compile dependent projects, when their headers are changed. CPPs are compiled properly. We have a bunch of "set INCLUDE=" in a .bat file, which also starts the DevStudio, so maybe there is the problem. But it works well with .NET 2003.

  • Enj

    Is that still an issue
    Thanks,
    Ayman Shoukry
    VC++ Team


  • tschmidt

    Is the header part of the project You can force a rebuild, if all else fails.



  • Donald E. King

    Yes, I realise a rebuild is a last resort. I used to have this problem at times, and it was because of changes to my system clock. Changing it caused problems with the last modified time that certainly VC6 was using to work out if it needed to do a build.



  • meeeeeeeeeep

    I remember the problem of shifted time. It happened to me many times. I of course check all times (created, accesed, modified) of all files, but everything seems fine. I tried to isolate the problem to the most simple solution. I can have only one static lib project, with only one header and one cpp. Both were almost empty. The cpp just included the header and the header has "int a;" inside. Everytime I change the header, nothing is compiled. But, once I copy this solution to another place (outside of what we set from cmd line by "set INCLUDE=" ), everything works well and is properly compiled after any change to the header ! And last but not less weird: for one VS 2005 running, I can make some simple change in "tools->options->Projects and Solution->VC++ directories->Include files" (e.g. swap two non-important dirs) and everything works fine !

  • VC++ 2005 doesnt compile, when non-startup project header is changed...