Can't find "UBT_COMPILED_PLATFORM/..." error, when opening a new C++ project in Visual Studio.

Hey there,
I just started out using Unreal Engine and worked only with blueprints. No I wanted to flush user inputs, so that the character stops walking when opening a widget. Anyways, I tried using C++ and I got 10000 errors like “Can’t find “UBT_COMPILED_PLATFORM/…””. Even after reinstalling Epic Launcher, Unreal Engine and Visual Studio I got the same Errors.
Pls help, I searched every google answer with the “UBT” in it. I don’t want to go back to Unity. Unreal was so great, untill it didn’t work anymore :grinning_face_with_smiling_eyes: :

Thanks in advance



Structure
OpenUproject_1
OpenUproject_2

2 Likes

Just solved this.

Go to your uproject file, right click, ‘Generate Visual Studio project files’

2 Likes

win10, UE 5.2.0, vscode

Finally I have this bug fixed helped by

Saved me after an hour of searching.

Add defines’ configuraion to your “c_cpp_properties.json” file

UBT_COMPILED_PLATFORM=<your platform>

For example:

{
	"configurations": [ 
		{ 
			"name": "CustomGame Editor Win64 Development", 
			"intelliSenseMode": "msvc-x64", 
			"compileCommands": "", 
			"cStandard": "c17",
			"cppStandard": "c++17", 
			"includePath": [ 
				......
			],
			"defines": [
				......, 
				"UBT_COMPILED_PLATFORM=Windows",
				......
			] 
		} 
	],
	"version": 
}