Visual C++ Developer Center >
Visual C++ Forums
>
Visual C++ General
>
fatal error C1083... Error suddenly showing up.
fatal error C1083... Error suddenly showing up.
- Hello all.
I am running VS 2008 professional edition SP1.
I have been using it for a while now and it has worked fine until last night I started a small homework assignment on it and when attempting to build the cpp I get this error:
"fatal error C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory."
This error is coming from a page "sal.h". I'm assuming this is a system file as I have never seen or worked with it before nor am I actually including any other pages in my code.
The only thing that has changed since the last time VS worked properly was I had to compress my HD for space reasons. I thought this may have corrupted or deleted some necessary VS files so I just preformed a repair install to no avail.
I created a test page with just the essential code for a hello world and it still causes this error so I'm sure it's not syntax related.
If anyone can provide any insight into this I would appreciate if very much.
Thanks,
Micah
All Replies
- Do a search in your hard disk and check if the file sourceannotations.h exists.If you find, it check its path.Also try uncompressing the path where this file resides.
«_Superman_»
Microsoft MVP (Visual C++) This question has already been discussed in this forum:
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvc/thread/74fb2040-90af-4237-b798-9ead04466e86- Marked As Answer byWesley YaoMSFT, ModeratorFriday, October 23, 2009 2:40 AM
- Unmarked As Answer byBeta_Grumm Wednesday, October 28, 2009 8:07 PM
- /sigh
I wish there were a way to actually fix VS's issues instead of spending an hour and half removing and reinstalling every time it craps itself and dies.
Thanks anways. - I hate to bring this back up but I've exhausted my resources.
I've reinstalled.
I've checked paths.
Drive is clean and uncompressed.
I have absolutely no idea why this happened / is still happening.
To recap:
Visual studio 2008 Professional.
Purchased and will soon be used as a production editor for my workplace. (Still in the process of converting over.)
Recently doing small learning projects and everything has been fine. suddenly one day, I fire it up, start a new project, write some lines, hit build and BAM! "fatal error C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory."
No idea what it is or why its there. Google searching isn't proving to be very fruitful.
Does anyone have any thoughts suggestions other then checking to see if the file exists (its doesnt, I checked) or reinstalling (did that twice now).
Thanks - Have you checked sourceannotations.h existence?
disc:\program files\microsoft visual studio 9.0\vc\include\CodeAnalysis\sourceannotations.h - Yes I checked just now. It does not exist. (This is a fresh install done yesterday)
- Very strange. Try to put it there (link).
Somehow installation was done incorrectly. - I actually had this same error message pop up while trying to build a Silverlight application. I'm scratching my head trying to remember what I did to remedy the situation. I think I might have corrected some XAML syntax and then the error message went away, but I'm not sure. All I do remember is that the error message was completely misleading.
- I have had problems like that in the past. The error was seemingly unrelated to the actual problem. It usually had to do with a syntax error of some kind.
That was the first thing I thought in this case but I have tried old projects, new projects and basic hello world code:
#include <iostream>
using namespace std;
void main()
{
cout << "hello world" << endl;
system("pause");
}
Not even that will compile.
I have to also mention that windows in unable to install some updates. .net security update and a SQL server 2005 security update.
Not sure if its related or not. I'm having a lot of trouble lately with a few things.
I've done the patches, updates, virus checking, all is clean.
I really don't want to have to blow out my OS and reinstall just for this. That would be depressing. :P - Try to place sourceannotations.h where it should be.
- Where do I get sourceannotations.h from?
- Oh I see. I missed your previous post. Let me give that a try.
- Ok, so I downloaded the file, placed it here: C:\Program Files\Microsoft Visual Studio 9.0\VC\include
Restarted VS, and still the same thing.
Now I'm really confused. - I suggest re-inserting your Visual Studio 2008 distribution disk. Hit the Repair option. Then reapply the VS 2008 SP1, and cross your fingers.
- Left the disks at home. I'll have to do that after work.
Thanks.
(I hope this works) - Whether suggestion from Brian Muth helped you?You have put sourceannotations.h file directly to ..\include folder or in ..\include\codeanalysis ?
- The suggestion from Brian did not work. I downloaded the files and put them in the proper directory but it did not resolve the issues.
However, over the weekend I have resolved the issue.
Re installation won out in the end. Third time was the charm. I have no idea when the previous installs would not work. Each time I would completely remove all VS products from the computer. Clean, restart and reinstall. Like I said the third time of installation it finally worked and seems to still be working.
Makes absolutely no sense at all.
So it appears that indeed reinstalling is the best way to go about this as Nikita L posted earlier in this topic. Just be aware that it may take more then one reinstall.


