x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

error: lambda capture 'class-name' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]

It was working fine before I updated my Xcode to 9.3. Now even I moved back to Xcode 9.2 but still getting this error

LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.2_of_8.cpp:27: LogPlayLevel:
/Work/UnrealEngine/Engine/Source/Runtime/Core/Private/HAL/UnrealMemory.cpp:279:13: error: lambda capture 'ArraySize' is not required to be captured for this use [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[Pointer, ArraySize]() LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.3_of_8.cpp:30: LogPlayLevel:
/Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Internationalization/TextLocalizationManager.cpp:219:36: error: lambda capture 'ShouldLoadEditor' is not required to be captured for this use [-Werror,-Wunused-lambda-capture] LogPlayLevel: auto ValidateRequestedCulture = [ShouldLoadEditor, ShouldLoadGame, &I18N](const FString& InRequestedCulture, const FString& InFallbackCulture, const TCHAR* InLogDesc, const bool bWarnIfNotExactMatch) -> FString LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.8_of_8.cpp:24: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:11: LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:245:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel:
/Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:109:14: note: in instantiation of function template specialization 'TTypeContainer::RegisterClass FBanana>' requested here LogPlayLevel: Container.RegisterClass FBanana>(ETypeContainerScope::Instance); LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.8_of_8.cpp:24: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:11: LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:255:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:245:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel:
/Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:110:14: note: in instantiation of function template specialization 'TTypeContainer::RegisterClass FStrawberry>' requested here LogPlayLevel:
Container.RegisterClass FStrawberry>(ETypeContainerScope::Instance); LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.8_of_8.cpp:24: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:11: LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:255:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:245:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel:
/Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:126:14: note: in instantiation of function template specialization 'TTypeContainer::RegisterClass FBanana>' requested here LogPlayLevel: Container.RegisterClass FBanana>(ETypeContainerScope::Thread); LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.8_of_8.cpp:24: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:11: LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:255:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel: 1 error generated. LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:245:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel:
/Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:127:14: note: in instantiation of function template specialization 'TTypeContainer::RegisterClass FStrawberry>' requested here LogPlayLevel:
Container.RegisterClass FStrawberry>(ETypeContainerScope::Instance); LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/Core/Module.Core.8_of_8.cpp:24: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Runtime/Core/Private/Tests/Misc/TypeContainerTest.cpp:11: LogPlayLevel:
Runtime/Core/Public/Misc/TypeContainer.h:255:7: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[this]() -> TSharedPtr { LogPlayLevel:
^ LogPlayLevel: 8 errors generated. LogPlayLevel: 1 error generated. LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/UnrealHeaderTool/Module.UnrealHeaderTool.cpp:2: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Programs/UnrealHeaderTool/Private/BaseParser.cpp:8: LogPlayLevel: In file included from Programs/UnrealHeaderTool/Private/ParserHelper.h:9: LogPlayLevel: In file included from Runtime/CoreUObject/Public/UObject/TextProperty.h:7: LogPlayLevel:
Runtime/CoreUObject/Public/UObject/UnrealType.h:3285:37: error: lambda capture 'LocalMapLayoutForCapture' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[LocalKeyPropForCapture, KeyPtr, LocalMapLayoutForCapture](void* NewElementKey) LogPlayLevel:
^ LogPlayLevel:
Runtime/CoreUObject/Public/UObject/UnrealType.h:3298:41: error: lambda capture 'LocalMapLayoutForCapture' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[LocalValuePropForCapture, ValuePtr, LocalMapLayoutForCapture](void* NewElementValue) LogPlayLevel:
^ LogPlayLevel:
Runtime/CoreUObject/Public/UObject/UnrealType.h:3808:47: error: lambda capture 'LocalSetLayoutForCapture' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[LocalElementPropForCapture, ElementToAdd, LocalSetLayoutForCapture](void* NewElement) LogPlayLevel:
^ LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Intermediate/Build/Mac/UnrealHeaderTool/Development/CoreUObject/PCH.CoreUObject.h:48: LogPlayLevel: In file included from /Work/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/CoreUObjectPrivatePCH.h:236: LogPlayLevel:
Runtime/CoreUObject/Public/UObject/UnrealType.h:3285:37: error: lambda capture 'LocalMapLayoutForCapture' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[LocalKeyPropForCapture, KeyPtr, LocalMapLayoutForCapture](void* NewElementKey) LogPlayLevel:
^ LogPlayLevel:
Runtime/CoreUObject/Public/UObject/UnrealType.h:3298:41: error: lambda capture 'LocalMapLayoutForCapture' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[LocalValuePropForCapture, ValuePtr, LocalMapLayoutForCapture](void* NewElementValue) LogPlayLevel:
^ LogPlayLevel:
Runtime/CoreUObject/Public/UObject/UnrealType.h:3808:47: error: lambda capture 'LocalSetLayoutForCapture' is not used [-Werror,-Wunused-lambda-capture] LogPlayLevel:
[LocalElementPropForCapture, ElementToAdd, LocalSetLayoutForCapture](void* NewElement) LogPlayLevel:
^ LogPlayLevel: 3 errors generated. LogPlayLevel: 3 errors generated. LogPlayLevel: Total build time: 14.56 seconds (Local executor: 7.72 seconds) LogPlayLevel: Error: UnrealHeaderTool failed for target 'UnrealFramework' (platform: IOS, module info: /Work/NewUnrealFramework/Intermediate/Build/IOS/UnrealFramework/Development/UnrealFramework.uhtmanifest, exit code: OtherCompilationError (5)). LogPlayLevel: Took 29.583506s to run mono, ExitCode=5 LogPlayLevel: ERROR: Command failed (Result:5): /Work/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe UnrealFramework IOS Development -Project=/Work/NewUnrealFramework/UnrealFramework.uproject /Work/NewUnrealFramework/UnrealFramework.uproject -NoUBTMakefiles -remoteini="/Work/NewUnrealFramework" -skipdeploy -ini:Game:[/Script/UnrealEd.ProjectPackag ingSettings]:BlueprintNativizationMethod=Disabled -noxge -nocreatestub -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2018.04.05-12.24.55.txt' LogPlayLevel: (see /Users/umair/Library/Logs/Unreal Engine/LocalBuildLogs/UAT_Log.txt for full exception trace) LogPlayLevel: AutomationTool exiting with ExitCode=5 (5) LogPlayLevel: Completed Launch On Stage: Build Task, Time: 42.002421 LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully. PackagingResults: Error: Launch failed! Unknown Error

Product Version: UE 4.18
Tags:
more ▼

asked Apr 05 '18 at 10:37 AM in Using UE4

avatar image

UmairAamir
6 1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first
more ▼

answered Apr 17 '18 at 05:55 PM

avatar image

iktomi
152 3 10 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I also run into this errors generated from [-Werror,-Wunused-lambda-capture] setting using Xcode 9.3 and was able to work around it with downgrading to Xcode 9.0.

more ▼

answered Apr 16 '18 at 03:57 PM

avatar image

j.mueller RFG
249 3 8 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

@iktomi Thanks the clang setting for the lambda is working. We need to add this in IOSPlatformCompilerPreSetup.h as well as MacPlatformCompilerPreSetup.h Just add this at the end of the file:

 // Apple LLVM 9.1.0 (Xcode 9.3)
 #if (__clang_major__ > 9) || (__clang_major__ == 9 && __clang_minor__ >= 1)
 #pragma clang diagnostic ignored "-Wunused-lambda-capture"
 #endif
more ▼

answered Jul 17 '18 at 05:20 PM

avatar image

rotwang
241 10 20 40

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question