# C++ blueprint function with input variables

**URL:** <https://forums.unrealengine.com/t/c-blueprint-function-with-input-variables/34912>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [July 10, 2015, 2:25pm UTC](https://forums.unrealengine.com/t/c-blueprint-function-with-input-variables/34912 "2015-07-10T14:25:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SoulRyder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SoulRyder](https://forums.unrealengine.com/u/SoulRyder)\
**Post date:** [July 10, 2015, 2:25pm UTC](https://forums.unrealengine.com/t/c-blueprint-function-with-input-variables/34912/1 "2015-07-10T14:25:33Z")

</div>

I am trying to create a function in C++ that can be added in the blueprint of the object, and it needs to have input variables. Should be very easy but I can’t figure out why I keep getting errors…

```auto

UFUNCTION(BlueprintCallable, Category = "SomeCategory")
static bool somefunction(FString SomeString, bool aBool);

```

I found an example here

> **[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 — ue4community.wiki! You will be able to find content from the official...

But it doesn’t work in my case, I keep getting an error:

```auto

ChildrensBook.generated.cpp.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl ACBPlayerController::somefunction(class FString,bool)" (?somefunction@ACBPlayerController@@SA_NVFString@@_N@Z)
1>D:\Basecamp Games\Projects\UE4 Project\ChildrensBook\Binaries\Win64\UE4Editor-ChildrensBook.dll : fatal error LNK1120: 1 unresolved externals

```

I see there is something wrong with the function, but no idea what exactly, and how I should do this otherwise …

Thanks for any help in advance!

Alexander

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [July 10, 2015, 2:51pm UTC](https://forums.unrealengine.com/t/c-blueprint-function-with-input-variables/34912/2 "2015-07-10T14:51:28Z")

</div>

You need to implement this function in your .cpp file. At least the way you declared it.
