fatal error C1010: unexpected end of file while looking for precompiled header directive

VC++은 파일 하나를 컴파일 할때 INCLUDE해야 할 파일이 너무 많아서 컴파일이 늦어지는 것을 막기위해 precompiled header라는 것을 만들었다.

이 헤더 파일(보통 stdafx.h)을 include한 .cpp는 미리 만들어진 precompiled header를 기본으로 사용하게 되어 있다.

하지만 다른 컴파일러로 만들어진 라이브러리(소스)에는 이런 것이 없을테니... -_-;

그럼에도 VC++ 컴파일러가 자기는 precompiled header가 필요하다고 저런 이상한 메시지를 내며 땡깡을 피운다.

이럴땐 해당하는 모든 .cpp의 맨 첫줄에 #include "stdafx.h"를 넣어주거나 해당하는 파일의 precomiled header 플래그를 꺼주면 된다.

끄는 방법은 project/setting 에서 c/c++ tab의 category의 precompiled header를 선택하고
Not using precompiled header를 선택한다.


'Dev > vc++, mfc, c#' 카테고리의 다른 글

[mfc]CString을 이용한 문자열 잘라내기  (0) 2008.04.11
형변환  (0) 2008.03.13

+ Recent posts