Hi,
I am trying to release an Unreal plugin named ‘Ariel’. To do this, the plugin must compile successfully using the RunUAT.bat
script, as described in section 2.6.3b here
I don’t have any errors when I am building the plugin through the Unreal engine editor, however the build failed when I try to compile using the RunUAT.bat
script and I don’t understand why…
The error comes from the plugin ‘main’ class generated by the unreal editor, or classes that are defined in the Unreal engine source files…
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\Ariel.cpp(28): error C2061: syntax error: identifier 'Ariel'
C:\Program Files\UE_5.1\Engine\Source\Runtime\Online\HTTP\Public\Interfaces\IHttpBase.h(10): error C2143: syntax error: missing ';' before '<class-head>'
C:\Program Files\UE_5.1\Engine\Source\Runtime\Online\HTTP\Public\Interfaces\IHttpBase.h(11): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
It seems that there are also errors with the ‘FJsonObject’ and ‘TSharedPtr’ classes:
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): error C2065: 'FJsonObject': undeclared identifier
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): error C2923: 'TSharedPtr': 'FJsonObject' is not a valid template type argument for parameter 'ObjectType'
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): note: see declaration of 'FJsonObject'
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): error C2976: 'TSharedPtr': too few template arguments
C:\Program Files\UE_5.1\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(669): note: see declaration of 'TSharedPtr'
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): error C2061: syntax error: identifier 'FJsonObject'
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): error C2672: 'MakeShareable': no matching overloaded function found
D:\temp\ARIEL_UE\HostProject\Plugins\Ariel\Source\Ariel\Private\ArielBPLibrary.cpp(25): error C2780: 'SharedPointerInternals::TRawPtrProxyWithDeleter<ObjectType,DeleterType> MakeShareable(ObjectType *,DeleterType &&)': expects 2 arguments - 1 provided
Do you have any idea how to fix these errors ? I tried multiple workarounds but sadly the errors remain…
Here is my plugin files:
Ariel.h:
#pragma once
#include "Modules/ModuleInterface.h"
class FArielModule : public IModuleInterface
{
public:
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};
Ariel.cpp:
#include "Ariel.h"
#define LOCTEXT_NAMESPACE "FArielModule"
void FArielModule::StartupModule() {}
void FArielModule::ShutdownModule() {}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FArielModule, Ariel)
Ariel.build.cs:
using UnrealBuildTool;
public class Ariel : ModuleRules
{
public Ariel(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(new string[] {});
PrivateIncludePaths.AddRange(new string[] {});
PublicDependencyModuleNames.AddRange(new string[] {
"Core",
"HTTP",
"Json"
});
PrivateDependencyModuleNames.AddRange(new string[] {
"CoreUObject",
"Engine",
"Slate",
"SlateCore",
});
DynamicallyLoadedModuleNames.AddRange(new string[]{});
}
}
Ariel.uplugin:
{
"EngineVersion": "5.1",
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0.4",
"FriendlyName": "Ariel",
"Description": "Ariel Text-To-Speech API plugin",
"Category": "Other",
"CreatedBy": "XandImmersion",
"CreatedByURL": "https://xandimmersion.com",
"DocsURL": "https://drive.google.com/file/d/1XQobsx9TpCQFhqnN0jxmNl8yAmjS2Lro/",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/ff439820f18e463caf0b38400ebe8389",
"SupportURL": "https://l.linklyhq.com/l/1fMJz",
"CanContainContent": true,
"IsBetaVersion": true,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "Ariel",
"Type": "Runtime",
"LoadingPhase": "Default",
"PlatformAllowList": [
"Win64",
"Mac",
"Linux"
]
}
]
}
Thank you for your help !