# Cannot declare FSlateBrush variable in custom C++ class

**URL:** <https://forums.unrealengine.com/t/cannot-declare-fslatebrush-variable-in-custom-c-class/432950>\
**Category:** C++\
**Tags:** lnk2019, engine-compile, unreal-engine, UE4, CPP, question\
**Created:** [September 1, 2018, 4:36pm UTC](https://forums.unrealengine.com/t/cannot-declare-fslatebrush-variable-in-custom-c-class/432950 "2018-09-01T16:36:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cherking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cherking](https://forums.unrealengine.com/u/cherking)\
**Post date:** [September 1, 2018, 4:36pm UTC](https://forums.unrealengine.com/t/cannot-declare-fslatebrush-variable-in-custom-c-class/432950/1 "2018-09-01T16:36:41Z")

</div>

I’m trying to create a variable for my blueprint items for my inventory system, so that each blueprint can store a slate brush image as a default class variable to display in the inventory but my module isn’t compiling when I declare a variable of FSlateBrush type.

```
#include "SlateBrush.h"

UPROPERTY(editAnywhere, BlueprintReadWrite, Category = "Appearance")
    FSlateBrush brush;

```

The compiler outputs this error

error LNK2019: unresolved external symbol “\_\_declspec(dllimport) public: \_\_cdecl FSlateBrush::FSlateBrush(void)” (\__imp_??0FSlateBrush@@QEAA@XZ) referenced in function …

---

<div class="post-metadata">

**Author:** ![Joffryn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Joffryn](https://forums.unrealengine.com/u/Joffryn)\
**Post date:** [November 8, 2018, 8:08pm UTC](https://forums.unrealengine.com/t/cannot-declare-fslatebrush-variable-in-custom-c-class/432950/2 "2018-11-08T20:08:12Z")

</div>

You need to go to your Build.cs file, which is stored in Source folder, and uncomment or add this line:

PrivateDependencyModuleNames.AddRange(new string[] { “Slate”, “SlateCore” });
