+2  A: 

And you have already checked for all the potential issues mentioned at msdn?

  1. File does not exist.
  2. File, subdirectory, or disk is read-only.
  3. No access permission for file or directory.
  4. Not enough file handles. Close some applications and recompile.
  5. The INCLUDE environment variable is set incorrectly.
  6. An #include directive uses double quotation marks around a path specification, which causes the standard directories to be skipped.
  7. You did not specify /clr and your program uses CLR constructs.
  8. You attempted to compile a single file in the project without first compiling stdafx.cpp. Before you can compile a single file in the project, you need to compile stdafx.cpp. In the case of the /analyze (Enterprise Code Analysis) compiler option, you will need to use the same /analyze setting for stdafx.cpp that you use for the .cpp file.
Ben Schwehn
I believe the issue is 8. In my frantic state, I did not even attempt to compile the project before adding things like #include "filename.h"
MedicineMan
A: 

I can't tell you the answer off the top of my head but I'm convinced this is exactly the sort of problem that inevitably succumbs to a little determination and logical problem solving. I'd do the following;

1) Find something that works, try other possibilities you haven't thought of yet eg

- #include "c:\projects\seriallibrary\serialheader.h"
- #include <serialheader.h>
- Copy serialheader.h to a known good include directory

2) If nothing works, reduce the problem to a minimum - one .cpp file one .h file

3) Once you get something to work, you'll be convinced that neither you or your development environment is irrational and/or crazy. At that stage you'll be ready to...

4) ...progressively transform the working but contrived situation into a practical situation you can actually use. Do this progressively at each stage testing that the new setup still works.

I am guessing that somewhere in step 4) you'll have an aha! moment and everything will become clear. Even if it doesn't you should have something that works that you can use in the meantime.

Note that with a few detail changes the recipe above is good for a huge variety of non-profound programming problems!

Bill Forster
sorry, I am losing my composure just a little bit.
MedicineMan