Does anyone know what causes this error? VC ++ with VisualAssert

Hello everyone who knows 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 ==========
+5
source share
3 answers

This is because something in your project is set up to use a file with precompiled headers, but nothing is set up to create it.

Right-click the file stdafx.cpp, select properties, go to C / C ++, pre-compiled headers, select "Create pre-compiled header" in the first edit window.

, " " , , " "

BTW. Infact, .

+4

. , "stdafx.cpp → Properties → C/++ → Precompiled Headers" "stdafx.h" . , .

+4

I had the same error when I added a new CPP file to my VS2008 solution. Having obtained permission by including the following header file in the new CPP file:

#include "StdAfx.h"
+1
source

All Articles