Fatal Error C1085 Running Visual Studio 2008 RRS feed

  • Question

  • I'm running Visual Studio 2008 in a virtual environment using VirtualBox.  Both the host and guest OSes are Windows XP Pro.  The Visual Studio solution and related protects are stored on the host OS and mapped to from the guest OS via a mapped network drive.  When I open Visual Studio and the solution on the host OS, it compiles flawlessly.  However, when I open them on the guest OS, I get this error:

    c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlsimpstr.h(287) : fatal error C1085: Cannot write precompiled header file: 'Debug\ZStackMTI.pch': The parameter is incorrect.

    What could be causing this?  I have verified write access is available, and the .pch file is being made.  All the macros for build command and properties appear to be correct.  Thanks.

    • Moved by Edwer Fang Thursday, November 18, 2010 3:08 AM (From:Getting Started With Visual Studio Team System)
    Friday, November 12, 2010 9:49 PM

All replies

  • Hello,

    I have ever seem a similar issue before, the following is the solution:

    '3. If you are compiling on a network drive (which we do) we found that forcing the pre-compiled header file to a local drive fixes the problem. To do this go to the Project Properties, then C/C++/Precompiled Header and change the "Precompiled Header File" setting to something like "C:\Temp\Project.pch". This has worked every time for us but it's annoying to have to put the .pch on a local drive. We even tried mapping the local drive as though it were a network drive and still had the problem.'


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, November 16, 2010 5:19 AM
  • Thanks for the tip, Edwer. I modified all the projects in my solution, as you suggested. The Precompiled Header File is now set to C:\Temp\$(TargetName).pch in all the project. However, I am now getting a different error:

    c1xx : fatal error C1083: Cannot open compiler intermediate file: 'C:\Documents and Settings\Administrator\Local Settings\Temp;C:\Temp\_CL_74f353c6sy': Invalid argument

    Any thoughts?

    Tuesday, November 16, 2010 2:58 PM
  • Hello,

    Well, actually I have not came across this issue and I am not the expert on C++, you can review the post I mentioned above to see if you can get any solutions.

    If it does not help, I think you can post this issue on Visual C++ Language Forum as there are more experts on this kind of issues.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, November 17, 2010 6:05 AM