0

Context: C++ MFC project in Visual Studio 2013

I had following problem:

Whenever I started debugging, VS2013 complained that my project was out of date even if a full successful rebuild (without any warnings) had been done just before. I tracked down the problem (not without difficulties) and found out that the cause was a .h file that was present in the project but that .h file didn't exist anymore and it wasn't used by any of the .cpp files. So I removed that .h file from the project and the problem went away.

Now is there a way to check for suche orphan .h files automatically ?

IMHO VS should at least show a warning saying that the .h file doesn't exist.

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
  • Load up the `.vcxproj` XML, extract the file paths, compare with the file system. – Bartek Banachewicz Oct 14 '15 at 09:18
  • @BartekBanachewicz sure, but shouldn't this be Visual Studio's job ? – Jabberwocky Oct 14 '15 at 09:19
  • 2
    In the referenced duplicate, for VS2013 you can go to Tools, Options, Projects and Solutions, Build and Run and change build output verbosity to `Detailed`. You get a line `Project not up to date because build input 'Header.h' is missing.`. – Mark Tolonen Oct 14 '15 at 09:52

0 Answers0