Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error? #15

Closed
xermao opened this issue Jul 28, 2023 · 7 comments
Closed

Compile error? #15

xermao opened this issue Jul 28, 2023 · 7 comments

Comments

@xermao
Copy link

xermao commented Jul 28, 2023

0>F:\UnrealProjects\Ue5CoroTest\Plugins\UE5Coro\Source\UE5CoroTests\Private\ReturnValueTest.cpp(121): Error C2065 : 'bInnerComplete': undeclared identifier

@landelare
Copy link
Owner

What compiler and what version?

@xermao
Copy link
Author

xermao commented Jul 29, 2023

vs2022+ue5.1

@ameaninglessname
Copy link

vs2022+ue5.1

That may not be enough, see:
#13 (comment)

@xermao
Copy link
Author

xermao commented Jul 29, 2023

CONSOLE: Use build tool: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\MSBuild.exe

0:36:33 Building F:\UnrealProjects\Ue5CoroTest\Intermediate\ProjectFiles\Ue5CoroTest.vcxproj
0>F:\AsLocalBuilds511_0401\Engine\Windows\Engine\Build\BatchFiles\Build.bat Ue5CoroTestEditor Win64 Development -Project="F:\UnrealProjects\Ue5CoroTest\Ue5CoroTest.uproject" -WaitMutex -FromMsBuild
0>Running UnrealBuildTool: dotnet "....\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" Ue5CoroTestEditor Win64 Development -Project="F:\UnrealProjects\Ue5CoroTest\Ue5CoroTest.uproject" -WaitMutex -FromMsBuild
0>Log file: C:\Users\xermao\AppData\Local\UnrealBuildTool\Log.txt
0>Building Ue5CoroTestEditor...
0>Using Visual Studio 2022 14.33.31631 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
0>[Upgrade]
0>[Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
0>[Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
0>[Upgrade] Suppress this message by setting 'IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;' in Ue5CoroTestEditor.Target.cs.
0>[Upgrade] Alternatively you can set this to 'EngineIncludeOrderVersion.Latest' to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
0>[Upgrade]
0>Determining max actions to execute in parallel (16 physical cores, 32 logical cores)
0> Executing up to 16 processes, one per physical core
0>Building 4 actions with 4 processes...
0>[1/4] Link UnrealEditor-UE5CoroTests.lib cancelled
0>[2/4] Link UnrealEditor-UE5CoroTests.dll cancelled
0>[3/4] WriteMetadata Ue5CoroTestEditor.target cancelled
0>[4/4] Compile ReturnValueTest.cpp
0>F:\UnrealProjects\Ue5CoroTest\Plugins\UE5Coro\Source\UE5CoroTests\Private\ReturnValueTest.cpp(121): Error C2065 : 'bInnerComplete': undeclared identifier
0>F:\UnrealProjects\Ue5CoroTest\Plugins\UE5Coro\Source\UE5CoroTests\Private\ReturnValueTest.cpp(158): Reference C2065 : see reference to function template instantiation 'void `anonymous-namespace'::DoTest<>(FAutomationTestBase &)' being compiled
0>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): Error MSB3073 : 命令“F:\AsLocalBuilds511_0401\Engine\Windows\Engine\Build\BatchFiles\Build.bat Ue5CoroTestEditor Win64 Development -Project="F:\UnrealProjects\Ue5CoroTest\Ue5CoroTest.uproject" -WaitMutex -FromMsBuild”已退出,代码为 6。
Build failed at 上午12:36:47

does this helpful?

@landelare
Copy link
Owner

You're using an old version of VS2022, please try updating. If you cannot, you can comment out that part of the code, it's only a test.

bInnerComplete itself is defined on line 116, and gets to line 121 via two [&] lambda captures in the CORO_R macro on lines 117 and 119; this is a bug in the compiler.
The latest version of VS2022 and Clang both compile this code without a warning.

I pushed a compiler workaround attempt to the test branch, does that help?

@xermao
Copy link
Author

xermao commented Jul 30, 2023

OK,I delete old toolchain in C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC,and it can be compiled.
Is there any way to choose verion of toolchain instead of delete them?

@landelare landelare closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2023
@landelare
Copy link
Owner

Not that I know of. You can switch between 2019 and 2022 using BuildConfiguration.xml and there's a blacklist somewhere inside of UBT (MicrosoftPlatformSDK.cs, BannedVisualCppVersions) where you can add your bad toolchain's version if you're running a source build. This won't help you much if you're using the build from the Epic launcher.

I would recommend only using the latest toolchain not just to get the plugin compiled, but also to avoid similar compiler bugs in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants