Compilation error on El Capitan (missing 'override')

Hi,

Clang bundled with XCode 7 on El Capitan warns now on missing override keyword in some of engine headers. Unreal build tool compiles with warnings treated as errors so compilation fails. I think disabling that warning should fix compilation.

Is it possible to add a compiler flag to unreal build tool?

I was trying to build the example StrategyGame project.

The actual error is:

Runtime/Engine/Classes/Engine/StaticMesh.h:291:2: error: '_getUObject' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]

Thanks

Any solution yet? We are facing a similar problem…

Hello, fszczemton

It is most likely that the error is caused by XCode upgrade.

Thus, you can use an older version for the compilation (If you like to learn more about getting an odler XCode version, please go here: Xcode - Support - Apple Developer).

Please note that in order to use an older XCode version, you need to adjust file paths in appropriate .cs files. Thus, please go to Engine->Programs->UnrealBuildTool->Mac->MacToolChain.cs and change the line 37 from

public static string XcodeDeveloperDir = "/Applications/Xcode.app/Contents/Developer/";

to

public static string XcodeDeveloperDir = "/Applications/Xcode_6.4.app/Contents/Developer/";

Please note that you may need to make the similar change in IOSToolChain.cs file (line 50) (can be found at Engine->Programs->UnrealBuildTool->IOS->IOSToolChain.cs).

Hope this helped!

Good luck!

adding -Wno-inconsistent-missing-override and -Wno-unused-local-typedefs to MacToolChain.cs works for me

Is this only for source engine builds?