views:

72

answers:

2

Hi does anyone know what causes this error? In Visual Studio 2008 with Visual Assert Thanks

 1>------ Build started: Project: ChessRound1, Configuration: Debug Win32 ------
    1>Compiling...
    1>stdafx.cpp
    1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xlocnum(135) : error C2857: '#include' statement specified with the /Ycstdafx.h command-line option was not found in the source file
    1>Build log was saved at "file://c:\Users\Admin1\Documents\Visual Studio 2008\Projects\ChessRound1\ChessRound1\Debug\BuildLog.htm"
    1>ChessRound1 - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
A: 

This happens because something in your project is configured to use the precompiled headers file but nothing is configured to create it.

Right click the file stdafx.cpp, select properties, go to C/C++, precompiled headers, select "Create precompiled header" in the first edit box.

If you want to disable precompiled headers completely, go to the project properties and select there "Not using precompiled header" and make sure that there aren't any files that override that settings to "Use precompiled header"

Visual assist has nothing to do with it BTW. Infact, visual assist never interferes with compilation.

shoosh
It looks like he is referring to http://www.visualassert.com/unit-testing-framework/
sean e
A: 

I just had this error while moving header and source files around. The problem was that in "stdafx.cpp -> Properties -> C/C++ -> Precompiled Headers" the path to "stdafx.h" was still pointing to the old location. When I updated the path to the new location the problem went away.

Sogartar