# RunUAT.bat BuildPlugin - syntax error: identifier '{plugin\_name}'

**URL:** <https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459>\
**Category:** Programming & Scripting\
**Tags:** build, Code-Plugins, unreal-engine, Plugins, Visual-Studio, CPP, question\
**Created:** [January 26, 2023, 4:15pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459 "2023-01-26T16:15:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xand449](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xand449](https://forums.unrealengine.com/u/xand449)\
**Post date:** [January 26, 2023, 4:15pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459/1 "2023-01-26T16:15:35Z")

</div>

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](https://www.unrealengine.com/en-US/marketplace-guidelines#263b)

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…

```auto
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:

```auto
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_:

```auto
#pragma once
#include "Modules/ModuleInterface.h"

class FArielModule : public IModuleInterface
{
public:

	/** IModuleInterface implementation */
	virtual void StartupModule() override;
	virtual void ShutdownModule() override;
};

```

_Ariel.cpp_:

```auto
#include "Ariel.h"

#define LOCTEXT_NAMESPACE "FArielModule"

void FArielModule::StartupModule() {}
void FArielModule::ShutdownModule() {}

#undef LOCTEXT_NAMESPACE
	
IMPLEMENT_MODULE(FArielModule, Ariel)

```

_Ariel.build.cs_:

```auto
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_:

```auto
{
	"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 !

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [January 26, 2023, 5:02pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459/2 "2023-01-26T17:02:29Z")

</div>

Hi xand449,

That document says you “can” use RunUAT.bat to compile - I don’t think it’s necessary - if it compiles and runs from VS, and you get the “package” button on your plugin, you should be good to go.

Something you could try though, is closing UE, making a change to your plugin source code without compiling, then opening your project - it should prompt, and then sucessfully compile your plugin.

---

<div class="post-metadata">

**Author:** ![xand449](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xand449](https://forums.unrealengine.com/u/xand449)\
**Post date:** [January 27, 2023, 12:59pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459/3 "2023-01-27T12:59:32Z")

</div>

Hi,

Thanks for your answer. In order to publish a plugin in the unreal marketplace, I need to send to epic my script files uncompiled (correct me if I’m wrong).

Then, they’ll use the RunUAT.bat on their side to check if the code provided can be compiled with the Epic’s compilation toolchain, which is more rigourous than others.

I tried to package my project by using the ‘Package’ button in Edit \> Plugin \> {Plugin name} \> Package but sadly the same errors appear… Do you have other ideas ?

[https://imgur.com/gnYGxpn](https://imgur.com/gnYGxpn)

---

<div class="post-metadata">

**Author:** ![xand449](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xand449](https://forums.unrealengine.com/u/xand449)\
**Post date:** [January 27, 2023, 2:28pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459/4 "2023-01-27T14:28:27Z")

</div>

Okay I find out why the plugin wouldn’t compile.

With @RecourseDesign answer’s, I find a previous post [here](https://forums.unrealengine.com/t/plugin-source-with-c-actor-error-during-build/348793) which says:

_…Or this might be also some improper include. You said you place Engine.h in some file, Engine.h should be included in TestPluginPrivatePCH.h as a first include + if you include something else from engine it Engine.h is sometimes ingerented from there_

That was it. I included `Engine.h` in the beginning of my `Ariel.h` header file and the build succeeded. I assume that this wasn’t a problem when compiling through the unreal editor because `Engine.h` was already added the linker by some other unreal script, but it wasn’t the case when packaging the plugin independently.

[https://imgur.com/a/on8q0rL](https://imgur.com/a/on8q0rL)

It’s funny because my IDE (Jetbrain Rider) say that the include is unused but it’s not really the case.

---

<div class="post-metadata">

**Author:** ![FaxLab3D](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/faxlab3d/32/1113136_2.png) [@FaxLab3D](https://forums.unrealengine.com/u/FaxLab3D)\
**Post date:** [March 5, 2023, 5:59pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459/5 "2023-03-05T17:59:40Z")

</div>

Amazing. Been having this issue for like a month. I just added the #include “Engine.h” like you said and it worked!  
No idea what it does or why I need it but hey, i dont care! Celebration time!

---

<div class="post-metadata">

**Author:** ![zompi2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zompi2/32/937524_2.png) [@zompi2](https://forums.unrealengine.com/u/zompi2)\
**Post date:** [April 23, 2024, 7:59pm UTC](https://forums.unrealengine.com/t/runuat-bat-buildplugin-syntax-error-identifier-plugin-name/757459/6 "2024-04-23T19:59:05Z")

</div>

I encountered this problem lately and yes, including “Engine.h” works!

However, this spawns a warning message  
`Warning: Monolithic headers should not be used by this module. Please change it to explicitly include the headers it needs.`

After lots of trials and errors I discovered, that the only header you need to include is actually:  
`Modules/ModuleManager.h` (instead of ModuleInterface.h).
