Visual C++ Developer Center > Visual C++ Forums > Visual C++ General > fatal error C1083... Error suddenly showing up.
Ask a questionAsk a question
 

Questionfatal error C1083... Error suddenly showing up.

  • Friday, October 16, 2009 7:44 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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

  • Friday, October 16, 2009 7:55 PM«_Superman_»MVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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++)
  • Friday, October 16, 2009 7:55 PMNikita Leontiev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
  • Friday, October 16, 2009 8:10 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    /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.
  • Wednesday, October 28, 2009 4:46 AMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Wednesday, October 28, 2009 8:45 AMNikita Leontiev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Have you checked sourceannotations.h existence?
    disc:\program files\microsoft visual studio 9.0\vc\include\CodeAnalysis\sourceannotations.h

  • Wednesday, October 28, 2009 7:58 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes I checked just now. It does not exist. (This is a fresh install done yesterday)
  • Wednesday, October 28, 2009 8:37 PMNikita Leontiev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Very strange. Try to put it there (link).
    Somehow installation was done incorrectly.
  • Wednesday, October 28, 2009 8:54 PMBrian MuthMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Wednesday, October 28, 2009 9:09 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Wednesday, October 28, 2009 9:14 PMNikita Leontiev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try to place sourceannotations.h where it should be.
  • Wednesday, October 28, 2009 9:27 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Where do I get sourceannotations.h from?
  • Wednesday, October 28, 2009 9:30 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Oh I see. I missed your previous post. Let me give that a try.
  • Wednesday, October 28, 2009 9:34 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Wednesday, October 28, 2009 9:49 PMBrian MuthMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I suggest re-inserting your Visual Studio 2008 distribution disk. Hit the Repair option. Then reapply the VS 2008 SP1, and cross your fingers.
  • Wednesday, October 28, 2009 10:09 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Left the disks at home. I'll have to do that after work.
    Thanks.
    (I hope this works)
  • Tuesday, November 03, 2009 4:52 PMNikita Leontiev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Whether suggestion from Brian Muth helped you?
    You have put sourceannotations.h file directly to ..\include folder or in ..\include\codeanalysis ?
  • Tuesday, November 03, 2009 8:51 PMBeta_Grumm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.