# Could not find definition for module, need help!

**URL:** <https://forums.unrealengine.com/t/could-not-find-definition-for-module-need-help/470489>\
**Category:** C++\
**Tags:** modules, unreal-engine, question, CPP\
**Created:** [August 31, 2020, 6:43am UTC](https://forums.unrealengine.com/t/could-not-find-definition-for-module-need-help/470489 "2020-08-31T06:43:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MVPaaryan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MVPaaryan](https://forums.unrealengine.com/u/MVPaaryan)\
**Post date:** [August 31, 2020, 6:43am UTC](https://forums.unrealengine.com/t/could-not-find-definition-for-module-need-help/470489/1 "2020-08-31T06:43:50Z")

</div>

Hi,  
I’m trying to create a editor module that runs at initialization.  
I’ve tried following a couple tutorials like:

- [http://cairansteverink.nl/cairansteverink/blog/creating-an-editor-module-in-unreal-engine-4/](http://cairansteverink.nl/cairansteverink/blog/creating-an-editor-module-in-unreal-engine-4/)
- [UE4 Code Modules — kantan](http://kantandev.com/articles/ue4-code-modules)
- [https://sandordaemen.nl/blog/creating-an-editor-module-in-unreal-engine-4/](https://sandordaemen.nl/blog/creating-an-editor-module-in-unreal-engine-4/)

and keep running into the same issue:

**Unable to delete C:\Users\anema\Documents\Unreal Projects\Testing\Binaries\Win64\UE4Editor-Testing.dll (Unable to delete ‘C:\Users\anema\Documents\Unreal Projects\Testing\Binaries\Win64\UE4Editor-Testing.dll’: Access to the path ‘C:\Users\anema\Documents\Unreal Projects\Testing\Binaries\Win64\UE4Editor-Testing.dll’ is denied.) Testing C:\Users\anema\Documents\Unreal Projects\Testing\Intermediate\ProjectFiles\UnrealBuildTool 1**

**Could not find definition for module ‘TestingEditor’, (referenced via TestingEditor.Target.cs) Testing C:\Users\anema\Documents\Unreal Projects\Testing\Intermediate\ProjectFiles\UnrealBuildTool 1**

**The command “chcp 65001 \>NUL && “C:\Program Files\Epic Games\UE\_4.25\Engine\Build\BatchFiles\Rebuild.bat” TestingEditor Win64 Development -Project=“C:\Users\anema\Documents\Unreal Projects\Testing\Testing.uproject” -WaitMutex -FromMsBuild” exited with code -1.**

I believe it might be an issue in the definition of my [ModuleName].h file, but i cant figure out the exact reason.

* * *

This is my [ModuleName].Build.cs file

```
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class TestingEditor : ModuleRules
{
	public TestingEditor(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Testing" });

		PrivateDependencyModuleNames.AddRange(new string[] { });

		PublicIncludePaths.AddRange(new string[] { "TestingEditor/Public" });

		PrivateIncludePaths.AddRange(new string[] { "TestingEditor/Private" });

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");

		// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
	}
}

```

* * *

This is my [ModuleName].h file, place in /Source/[ModuleName]/Public/

```
#pragma once

#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#include "Modules/ModuleInterface.h"

class FTestingEditorModule : public IModuleInterface
{
public:

	virtual void StartupModule() override;
	virtual void ShutdownModule() override;

};

```

* * *

and finally my [ModuleName].cpp file place in the private folder

```
#include "..\Public\TestingEditor.h"
#include "Modules/ModuleManager.h"

IMPLEMENT_GAME_MODULE(FTestingEditorModule, TestingEditor);

#define LOCTEXT_NAMESPACE "FTestingEditorModule"

void FTestingEditorModule::StartupModule()
{
	UE_LOG(LogTemp, Warning, TEXT("StartupModule() called"));
}

void FTestingEditorModule::ShutdownModule()
{
	UE_LOG(LogTemp, Warning, TEXT("ShutdownModule() called"));
}

#undef LOCTEXT_NAMESPACE

```

* * *

Added the module description in the .uproject file

```
{
			"Name": "TestingEditor",
			"Type": "Editor",
			"LoadingPhase": "PreDefault"
		}

```

* * *

and below is my editor.target.cs file

```
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class TestingEditorTarget : TargetRules
{
	public TestingEditorTarget( TargetInfo Target) : base(Target)
	{
		Type = TargetType.Editor;
		DefaultBuildSettings = BuildSettingsVersion.V2;
		ExtraModuleNames.AddRange( new string[] { "Testing", "TestingEditor" } );
	}
}

```

this might be the cause of the error as VS shows the function  
**IMPLEMENT\_GAME\_MODULE(F[ModuleName]Module, [ModuleName]);**  
as function definition for the above function is not found

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_625cf764](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_625cf764](https://forums.unrealengine.com/u/anonymous_user_625cf764)\
**Post date:** [July 6, 2021, 3:32am UTC](https://forums.unrealengine.com/t/could-not-find-definition-for-module-need-help/470489/2 "2021-07-06T03:32:14Z")

</div>

Hi , I came across the problem just like yours -----“Could not find definition for module ‘TestingEditor’, (referenced via TestingEditor.Target.cs)”,and my refered the [article](https://lxjk.github.io/2019/10/01/How-to-Make-Tools-in-U-E.html#_setup_editor_module),and i found out that in “xxxEditor.Target.cs” just do not include “xxxEditor” ,then the error disappered. In xxEditor.Target.cs like this `ExtraModuleNames.AddRange(new string[] { "xx" });`

in xx.Targer.cs `ExtraModuleNames.AddRange( new string[] { "xx" , "xxEditor" } );`  
Hope it can help!

---

<div class="post-metadata">

**Author:** ![teknosanity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@teknosanity](https://forums.unrealengine.com/u/teknosanity)\
**Post date:** [April 26, 2022, 11:36am UTC](https://forums.unrealengine.com/t/could-not-find-definition-for-module-need-help/470489/3 "2022-04-26T11:36:27Z")

</div>

Thank you, this helped me a lot!

---

<div class="post-metadata">

**Author:** ![aaron.beauchamp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aaron.beauchamp](https://forums.unrealengine.com/u/aaron.beauchamp)\
**Post date:** [September 19, 2025, 6:30pm UTC](https://forums.unrealengine.com/t/could-not-find-definition-for-module-need-help/470489/4 "2025-09-19T18:30:42Z")

</div>

> [@anonymous\_user\_625cf764](#):
>
> ExtraModuleNames.AddRange( new string { “xx” , “xxEditor” } );

Can confirm this still works upgrading from 5.5 to 5.6.  
Simply commenting out “ExtraModuleNames.AddRange( new string { “xx” , “xxEditor” } );” in both the target files and then building the project worked. I was worried this would cause downstream impacts but the project loaded perfectly fine.
