Error C1010 unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? - 해결방법

CODEDRAGON Development/C, C++

반응형



 

 

오류메시지

Error        C1010        unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

Severity        Code        Description        Project        File        Line        Suppression State

Error        C1010        unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?        ch-basic        c:\codelab\git_study\study_cpp\ch-basic\ch-basic\ex05.cpp        44        

 

 

 


 

 

 

 

 

오류 원인

·         VisualStudio 있는 VC++외의 다른 컴파일러에서 빌드한 경우 발생할 있습니다.

·         다른 스타일로 작성된 라이브러리를 링크하면 에러가 발생할 있습니다.

·         빠른 빌드를 위한 PCH (precompiled header) 설정시 에러가 발생할 있습니다.

 

 

 

 

 

 

해결 방법

VS 메뉴: [Project] >> [ProjectName Properties...] >>

왼쪽 [Configuration Properties] > [C/C++] > [Precompiled Headers]


 

 

오른쪽 창의 "Precompiled Header"

[Use (/Yu)] [Not Using Precompiled Headers] 변경합니다.


 

 

 

반응형