Cannot compile C++ Class Moving Platfom for mac

Successfully added class ‘MovingPlatform’, however you must recompile the ‘ObstacleAssault’ module before it will appear in the Content Browser. Failed to generate project files.

Would you like to open the Output Log to see more details?

Setting up bundled DotNet SDK

/Users/Shared/Epic Games/UE_5.1/Engine/Build/BatchFiles/Mac/…/…/…/Binaries/ThirdParty/DotNet/6.0.302/mac-x64

Running dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll -projectfiles -project=/Users/yinjinli/Documents/Unreal Projects/cObstacleAssault/cObstacleAssault.uproject -game -rocket -progress

Log file: /Users/yinjinli/Library/Application Support/Epic/UnrealBuildTool/Log_GPF.txt

Some Platforms were skipped due to invalid SDK setup: Mac, IOS, Android.

See the log file for detailed information

Discovering modules, targets and source code for project…


Generating data for project indexing…

Exception while generating include data for UnrealEditor: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.

Exception while generating include data for cObstacleAssaultEditor: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.

Generating data for project indexing… 100%

Writing project files…

Writing project files… 67%

Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.

at UnrealBuildTool.VSCodeProjectFileGenerator.WriteConfiguration(String Name, String ProjectName, IEnumerable1 SourceFiles, CppStandardVersion CppStandard, FileReference CompilerPath, DirectoryReference SysRootPath, Dictionary2 ModuleCommandLines, JsonFile OutFile, DirectoryReference OutputDirectory) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/VisualStudioCode/VSCodeProjectFileGenerator.cs:line 670

at UnrealBuildTool.VSCodeProjectFileGenerator.WriteCppPropertiesFile(DirectoryReference OutputDirectory, ProjectData Projects) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/VisualStudioCode/VSCodeProjectFileGenerator.cs:line 656

at UnrealBuildTool.VSCodeProjectFileGenerator.WritePrimaryProjectFile(ProjectFile UBTProject, PlatformProjectGeneratorCollection PlatformProjectGenerators, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/VisualStudioCode/VSCodeProjectFileGenerator.cs:line 281

at UnrealBuildTool.ProjectFileGenerator.WriteProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/ProjectFileGenerator.cs:line 2821

at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, String Arguments, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/ProjectFileGenerator.cs:line 1176

at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/Modes/GenerateProjectFilesMode.cs:line 233

at UnrealBuildTool.UnrealBuildTool.Main(String ArgumentsArray) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.cs:line 648

LogSlate: Window ‘消息’ being destroyed

Message dialog closed, result: Yes, title: 消息, text: 已成功添加类“MovingPlatform”,但必须在重新编译“cObstacleAssault”模块后它才会出现在内容浏览器中。项目文件生成失败。


LogSlate: Window ‘添加C++类’ being destroyed

I also tested Unreal Engine version 5.3 and it worked fine :cry:

As a side note, I’m currently using Macbook Pro with Apple Silicon M1 Pro and Unreal Engine 5.1.1. Also, I’ve installed XCode 15.0.1 but I’ve changed the source code editor to Visual Studio Code.

I don’t believe 5.1 supports Xcode 15, you would have to downgrade if you want to use 5.1 but I’d suggest going with 5.3

But Unreal Learning Toolkit supports up to 5.1, maybe I need to downgrade Xcode, so what version of Xcode do I need to downgrade to because I’m following up with Unreal Engine 5 C++ Developer: Learn C++ & Make Video Games in Chapter 3

Is there any way to follow up on Chapter 3 while maintaining Xcode15 and 5.1?

You can use the learning toolkit with 5.3 as it still works

When I created the project, it showed that the 5.1 version was supported at most, so what can I do to open it in 5.3?

These are the two project files I’m going to open

Create it as 5.1 then upgrade to 5.3. If you are using windows, you can right click on the uproject and select the upgrade project from the context menu and change to 5.3

Delete the binaries and intermediate files first, then back up the files before doing this and the double click the uproject. It will recompile and should open just fine.

For Mac/Linux, once you have the project created in 5.1, launch the 5.3 editor so you get the create project/open project and then browse to the project. On open should upgrade the project to 5.3 and it should open correctly.

As said before, do this with a backup.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms