# Linker Errors when deriving off NavMeshBounds

**URL:** <https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473>\
**Category:** World Creation\
**Tags:** navmeshbounds, unreal-engine, navmesh, CPP, question\
**Created:** [November 16, 2016, 12:08pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473 "2016-11-16T12:08:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_ce194917](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ce194917](https://forums.unrealengine.com/u/anonymous_user_ce194917)\
**Post date:** [November 16, 2016, 12:08pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/1 "2016-11-16T12:08:24Z")

</div>

I’m having a bit of trouble understanding why I can’t make a class that derives off of ANavMeshBoundsVolume. When I create the class, I get Linker errors which I wasn’t expecting and am not really sure about how to resolve. The errors are:

```
CompilerResultsLog:Error: Error MyNavMeshBoundsVolume.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ANavMeshBoundsVolume::PostRegisterAllComponents(void)" (?PostRegisterAllComponents@ANavMeshBoundsVolume@@UEAAXXZ)

CompilerResultsLog:Error: Error TheRelic.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ANavMeshBoundsVolume::PostRegisterAllComponents(void)" (?PostRegisterAllComponents@ANavMeshBoundsVolume@@UEAAXXZ)

CompilerResultsLog:Error: Error MyNavMeshBoundsVolume.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ANavMeshBoundsVolume::PostUnregisterAllComponents(void)" (?PostUnregisterAllComponents@ANavMeshBoundsVolume@@UEAAXXZ)

CompilerResultsLog:Error: Error TheRelic.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ANavMeshBoundsVolume::PostUnregisterAllComponents(void)" (?PostUnregisterAllComponents@ANavMeshBoundsVolume@@UEAAXXZ)

CompilerResultsLog:Error: Error MyNavMeshBoundsVolume.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ANavMeshBoundsVolume::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ANavMeshBoundsVolume@@UEAAXAEAUFPropertyChangedEvent@@@Z)

CompilerResultsLog:Error: Error TheRelic.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ANavMeshBoundsVolume::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ANavMeshBoundsVolume@@UEAAXAEAUFPropertyChangedEvent@@@Z)

```

The generated cpp is:

```
// Fill out your copyright notice in the Description page of Project Settings.

#include "TheRelic.h"
#include "MyNavMeshBoundsVolume.h"

```

The generated header file is

```
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "AI/Navigation/NavMeshBoundsVolume.h"
#include "MyNavMeshBoundsVolume.generated.h"

/**
 * 
 */
UCLASS()
class THERELIC_API AMyNavMeshBoundsVolume : public ANavMeshBoundsVolume
{
	GENERATED_BODY()
	
	
	
	
};

```

Any thoughts about why this is? I suspect there’s some macro or keyword I don’t know about.

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [November 16, 2016, 1:46pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/2 "2016-11-16T13:46:43Z")

</div>

Hi, I suspect you are missing a module from your Build.cs file. According to this [link wiki](https://wiki.unrealengine.com/AI_Navigation_in_C%2B%2B,_Customize_Path_Following_Every_Tick) you may have to add “AIModule” in the project dependencies.

If it’s not AIModule it’s probably another one but I’m almost sure you are just missing a dependency there.

Good luck !  
Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ce194917](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ce194917](https://forums.unrealengine.com/u/anonymous_user_ce194917)\
**Post date:** [November 16, 2016, 2:10pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/3 "2016-11-16T14:10:46Z")

</div>

I tried that and it still didn’t compile. It seemed that ANavMeshBoundsVolume was in the Core engine anyway, unless I’m misunderstood how the module system works.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [November 16, 2016, 2:16pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/4 "2016-11-16T14:16:56Z")

</div>

Isn’t it because some pure virtual function defined in ANavMeshBoundsVolume are not implemented in your derived class ?

Try to add theses undefined function in your derived class, implement them by just calling the Super::XXX function and see if it works 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ce194917](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ce194917](https://forums.unrealengine.com/u/anonymous_user_ce194917)\
**Post date:** [November 16, 2016, 2:20pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/5 "2016-11-16T14:20:56Z")

</div>

But ANavMeshBoundsVolume has a function definition.

`void ANavMeshBoundsVolume::PostRegisterAllComponents()  
{  
Super::PostRegisterAllComponents();

```
UNavigationSystem* NavSys = UNavigationSystem::GetCurrent(GetWorld());
if (NavSys && Role == ROLE_Authority)
{
	NavSys->OnNavigationBoundsAdded(this);
}

```

}

`

I didn’t think I had to define a definition if one already exists in the base class?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [November 16, 2016, 2:31pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/6 "2016-11-16T14:31:08Z")

</div>

I agree with you, but try it anyway just in case it’s some of the Unreal magic again :D.

In your class, define the same function using the keyword “override” at the end. Then in your c++ code, implement the function like this:

```
void MYCLASS::PostRegisterAllComponents()
{
    Super::PostRegisterAllComponents();
}

```

and see if it fixes. If it doesn’t, that’s 100% a missing module in your build.cs (Just need to find which one :D)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ce194917](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ce194917](https://forums.unrealengine.com/u/anonymous_user_ce194917)\
**Post date:** [November 16, 2016, 2:33pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/7 "2016-11-16T14:33:03Z")

</div>

Yeah I did that as well and still have the same linker error with the Super:: command. Is there a good way of finding which module is required? I seem to struggle to find any resources which indicates what class belongs to what module.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [November 16, 2016, 2:40pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/8 "2016-11-16T14:40:02Z")

</div>

I’m pretty sure you missed something  
Take a look at this tutorial again and let us know 🙂

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ce194917](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ce194917](https://forums.unrealengine.com/u/anonymous_user_ce194917)\
**Post date:** [November 16, 2016, 2:44pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/9 "2016-11-16T14:44:28Z")

</div>

I’ve since found a work around for my original issue but will take another look in a while as I don’t like my workaround.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [November 16, 2016, 4:59pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/10 "2016-11-16T16:59:21Z")

</div>

`ANavMeshBoundsVolume` is not fully exposed to the API. You’d need to change engine sources to say something like this:

```
UCLASS()
class ENGINE_API ANavMeshBoundsVolume : public AVolume

```

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1600e71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1600e71](https://forums.unrealengine.com/u/anonymous_user_e1600e71)\
**Post date:** [November 16, 2016, 5:18pm UTC](https://forums.unrealengine.com/t/linker-errors-when-deriving-off-navmeshbounds/376473/11 "2016-11-16T17:18:45Z")

</div>

Oh wow that was bit out of my range haha 😃
