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

Compilation error on 4.20 after last commit #52

Open
dc740 opened this issue Aug 5, 2018 · 3 comments
Open

Compilation error on 4.20 after last commit #52

dc740 opened this issue Aug 5, 2018 · 3 comments

Comments

@dc740
Copy link

dc740 commented Aug 5, 2018

I tried to compile this for the first time, and the code from this commit gave me some trouble:
e819333

ProcessResult.StdOut: Performing 2 actions (16 in parallel)
ProcessResult.StdOut: [1/2] Compile Module.SurvivalGame.cpp
ProcessResult.StdErr: In file included from /media/dc740/a2be0123-5f46-4405-89f3-475303f5b9b7/Proyectos/UnrealSurvivalGameSeries/SurvivalGame/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/SurvivalGame/Module.SurvivalGame.cpp:31:
ProcessResult.StdErr: �[1m/media/dc740/a2be0123-5f46-4405-89f3-475303f5b9b7/Proyectos/UnrealSurvivalGameSeries/SurvivalGame/Source/SurvivalGame/Private/World/SGameMode.cpp:422:135: �[0m�[0;1;31merror: �[0m�[1m'&&' within '||' [-Werror,-Wlogical-op-parentheses]�[0m
ProcessResult.StdErr: if (!Actor->IsA(ALevelScriptActor::StaticClass()) && !Actor->IsA(ASMutator::StaticClass()) && Actor->GetRootComponent() != nullptr && Actor->GetRootComponent()->Mobility != EComponentMobility::Static || (!Actor->IsA(AStaticMeshActor::StaticClass()) && !Actor->IsA(ALight::StaticClass())))
ProcessResult.StdErr: �[0;1;32m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
ProcessResult.StdErr: �[0m�[1m/media/dc740/a2be0123-5f46-4405-89f3-475303f5b9b7/Proyectos/UnrealSurvivalGameSeries/SurvivalGame/Source/SurvivalGame/Private/World/SGameMode.cpp:422:135: �[0m�[0;1;30mnote: �[0mplace parentheses around the '&&' expression to silence this warning�[0m
ProcessResult.StdErr: if (!Actor->IsA(ALevelScriptActor::StaticClass()) && !Actor->IsA(ASMutator::StaticClass()) && Actor->GetRootComponent() != nullptr && Actor->GetRootComponent()->Mobility != EComponentMobility::Static || (!Actor->IsA(AStaticMeshActor::StaticClass()) && !Actor->IsA(ALight::StaticClass())))
ProcessResult.StdErr: �[0;1;32m ^
ProcessResult.StdErr: �[0m�[0;32m ( )
ProcessResult.StdErr: �[0m1 error generated.
ProcessResult.StdOut: ERROR: UBT ERROR: Failed to produce item: /media/dc740/a2be0123-5f46-4405-89f3-475303f5b9b7/Proyectos/UnrealSurvivalGameSeries/SurvivalGame/Binaries/Linux/libUE4Editor-SurvivalGame.so
ProcessResult.StdOut: (see /home/dc740/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-SurvivalGameEditor-Linux-Development_2.txt for full exception trace)
ProcessResult.StdOut: Total build time: 23.13 seconds (Local executor: 0.00 seconds)
CommandUtils.Run: Took 23.969898s to run mono, ExitCode=5

I "fixed" it by adding extra parenthesis on the first set of AND conditions, like this

if ((!Actor->IsA(ALevelScriptActor::StaticClass()) && !Actor->IsA(ASMutator::StaticClass()) && Actor->GetRootComponent() != nullptr &&
				Actor->GetRootComponent()->Mobility != EComponentMobility::Static) || (!Actor->IsA(AStaticMeshActor::StaticClass()) && !Actor->IsA(ALight::StaticClass())))

Now it compiles just fine.

Thank you

@virtualme1
Copy link

virtualme1 commented Aug 8, 2018

Thanks works on Ubuntu 18.04.1 now with ue4.20.1

@chris3199
Copy link

Still having the same trouble but now on windows with ue 4.20.2

@Masakralny
Copy link

I tried to generate project files ,because of compilation problems. What should I do with this error?
ERROR: UnrealBuildTool Exception: Visual Studio 2017 requires the Universal CRT to be installed.
I have Win 8.1 64bit.... Universal CRT is installed and Win 8.1 SDK is installed ,too...

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

4 participants