When I tried to create a C++ project after changing the source code from VS to VS Code (I am using Visual Studio 2019 Community Version), the error popped up saying I cannot compile the file:
Running C:/Program Files/UE_4.22/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project="C:/Users/zimu/Documents/Unreal Projects/我的项目3/我的项目3.uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE
Creating makefile for ?ҵĿ3Editor (no existing makefile)
@progress push 5%
Parsing headers for ?ҵĿ3Editor
Running UnrealHeaderTool "C:\Users\zimu\Documents\Unreal Projects\?ҵĿ3\?ҵĿ3.uproject" "C:\Users\zimu\Documents\Unreal Projects\?ҵĿ3\Intermediate\Build\Win64\?ҵĿ3Editor\Development\?ҵĿ3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
C:/Users/zimu/Documents/Unreal Projects/????3/Source/????3/????3GameModeBase.h(1): Error: Missing UCLASS name
Yeah, there are some Chinese characters inside because I am using a Chinese version of Epic Game Launcher and UE4. There are some "?"s in the error message too.
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include “CoreMinimal.h” #include “GameFramework/GameModeBase.h” #include “我的项目3GameModeBase.generated.h”
/**
*
*/
UCLASS()
class 我的项目3_API A我的项目3GameModeBase : public AGameModeBase
{
GENERATED_BODY()
};
here it is, “我的项目3” means “My project 3” in Chinese
I am afraid it’s connected with non-English characters as Saltylele backup suggested. You should not use any non-English characters in source code when writing C++. However you said in your first post that your project stopped compiling after changing VS to VS Code? Is that correct? Can you confirm it was compiling before just fine?
I tried create new C++ class in my test project with non-English characters in it’s name (just in case) and it didn’t work too.