[Unreal] macOS 에서 빌드 시 variable “LayerNames” set but not used [-Werror,-Wunused-but-set-variable] 에러가 발생하는 경우
UE4 4.27.2
macOS Monterey 12.3.1
Rider 2022.1 EAP 9
Xcode 13.3
Xcode 업데이트 이후 macOS에서 C++ 프로젝트 빌드 시 아래의 에러가 발생하는 프로젝트가 있었다.
variable “LayerNames” set but not used [-Werror,-Wunused-but-set-variable]
Xcode가 업데이트 되면서 더 엄격한 컴파일을 수행하며 발생하는 에러로 보인다.
Xcode 버전을 13.2.1(Apple Developer 다운로드 링크)로 교체하거나 프로젝트의 Target.cs 파일들에 아래의 코드를 추가하면 해결된다.
bOverrideBuildEnvironment = true;
AdditionalCompilerArguments = "-Wno-unused-but-set-variable";
출처 : 언리얼 포럼
Author And Source
이 문제에 관하여([Unreal] macOS 에서 빌드 시 variable “LayerNames” set but not used [-Werror,-Wunused-but-set-variable] 에러가 발생하는 경우), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@hon454/Unreal-macOS-에서-빌드-시-variable-LayerNames-set-but-not-used-Werror-Wunused-but-set-variable-에러가-발생하는-경우저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)