본문 바로가기 메뉴 바로가기

티스토리 뷰

Software/Windows

[VS] C1027

2015. 4. 1. 09:34
> vs2010 에서 다음과 같은 오류가 발생한다

c1xx : fatal error C1027: 미리 컴파일된 헤더를 만들 때와 사용할 때의 /Ym의 값이 일치하지 않습니다.

c1xx : fatal error C1027: Inconsistent values for /Ym between creation and use of precompiled header

> 왜지?
검색어: C1027 error

비슷한 고민을 한 사람이 많았다. 그 중에

error C1027: Inconsistent values for /Ym between creation and use of precompiled header (C++)

...

Microsoft이(가) 2012-05-11, 오후 6:28에 게시 Hi: /Ym is an internal switch that is used between the driver (cl.exe) and the parsers (c1.dll and c1xx.dll) it is used to pass the address of the contiguous memory that has been reserved by cl.exe for the PCH. We do this reservation in the driver so that we can reserve the memory as early as possible in the process before too many DLLs have been loaded (and have grabed the memory we need). The compiler requires that the PCH is loaded at exactly the same address during a /Yu build as it was during a /Yc build -- the C1027 error you are seeing implies that in a /Yu build the driver was not able to reserve the memory at the required address.

Please note that we do not officially support this switch and it can be removed entirely from the product. Please remove it from your project settings. Most likely you have no need for it.

Tanveer Gani

Visual C++ Team


@https://connect.microsoft.com/VisualStudio/feedback/details/731299/error-c1027-inconsistent-values-for-ym-between-creation-and-use-of-precompiled-header-c

> 결론

위에서 핵심은 the C1027 error you are seeing implies that in a /Yu build the driver was not able to reserve the memory at the required address. 요거다.

즉, 메모리가 모자라서 그러한다는 것이군요!
아래 링크를 보면(ogre3d 쪽), 모자란 메모리를 가지고 있다면, /Zm1000 -> /Zm500 요런식으로 작게 설정해야 합니다.
/Zm 은 Precompiled Header 파일의 최대 크기(?)입니다.

http://www.ogre3d.org/forums/viewtopic.php?f=2&t=60015
https://public.kitware.com/Bug/view.php?id=13867


댓글