# Can't Build My Project C++ and Blueprint (BluePrintFunction)

**URL:** <https://forums.unrealengine.com/t/cant-build-my-project-c-and-blueprint-blueprintfunction/632787>\
**Category:** C++\
**Tags:** ufunction, unreal-engine, UE5-0, CPP, Blueprint, question\
**Created:** [August 23, 2022, 4:58pm UTC](https://forums.unrealengine.com/t/cant-build-my-project-c-and-blueprint-blueprintfunction/632787 "2022-08-23T16:58:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![valeriorobert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@valeriorobert](https://forums.unrealengine.com/u/valeriorobert)\
**Post date:** [August 23, 2022, 4:58pm UTC](https://forums.unrealengine.com/t/cant-build-my-project-c-and-blueprint-blueprintfunction/632787/1 "2022-08-23T16:58:33Z")

</div>

Hi, I have a Custom BlueprintFunction in UE4.27 (not created by me) that I have to import to UE5.

The Project won’t compile/build. The Custom BlueprintFunction doesn’t show up.

The Function from the various tutorial showed up.

I follow a lot of tutorials and see a lot of resources, which I think could be an error from the C++ file. Maybe the old function isn’t compatible with UE5.

Can anyone look at my files and help me?

If need any other files just ask \<3

These are the original files from UE4

[WIDGETSFunctionLibrary.cpp](https://forums.unrealengine.com/uploads/short-url/Aw9wFFOF8cBfP6v2d8SxNjGPPjj.cpp) (1.6 KB)  
[WIDGETSFunctionLibrary.h](https://forums.unrealengine.com/uploads/short-url/xhstcNkModaKFmfbHBNj9wxApWl.h) (772 Bytes)

These are the CustomFunction created by me

[MyBlueprintFunctionLibrary.h](https://forums.unrealengine.com/uploads/short-url/zXIfA1ot1UIpcVcxDsy40SsLuhm.h) (788 Bytes)  
[MyBlueprintFunctionLibrary.cpp](https://forums.unrealengine.com/uploads/short-url/yZYRvAa9QjOtO9xEcUIOyrAHSXC.cpp) (1.6 KB)

And finally, this is the error from Unreal Build

```auto
> 
> File C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Intermediate\Build\Win64\UnrealEditor\Development\ProvaLibrary\MyBlueprintFunctionLibrary.cpp.obj was modified or is new
> File C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Intermediate\Build\Win64\UnrealEditor\Development\ProvaLibrary\MyClass.cpp.obj was modified or is new
> File C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Intermediate\Build\Win64\UnrealEditor\Development\ProvaLibrary\ProvaLibrary.cpp.obj was modified or is new
> File C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Intermediate\Build\Win64\UnrealEditor\Development\ProvaLibrary\MyBlueprintFunctionLibrary.gen.cpp.obj was modified or is new
> File C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Intermediate\Build\Win64\UnrealEditor\Development\ProvaLibrary\ProvaLibrary.init.gen.cpp.obj was modified or is new
> Building patch from 5 file(s) for Live coding module C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Binaries\Win64\UnrealEditor-ProvaLibrary.dll
> Creazione della libreria C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Binaries\Win64\UnrealEditor-ProvaLibrary.patch_0.lib e dell'oggetto C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Binaries\Win64\UnrealEditor-ProvaLibrary.patch_0.exp
> MyBlueprintFunctionLibrary.cpp.obj : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public:__cdecl FWidgetRenderer::FWidgetRenderer(bool,bool)" (__imp_??0FWidgetRenderer@@QEAA@_N0@Z) non risolto nella funzione "private: static class UTextureRenderTarget2D *__cdecl UMyBlueprintFunctionLibrary::WidgetToRenderTarget(class UTextureRenderTarget2D *,class UWidget *,struct UE::Math::TVector2<double>)" (?WidgetToRenderTarget@UMyBlueprintFunctionLibrary@@CAPEAVUTextureRenderTarget2D@@PEAV2@PEAVUWidget@@U?$TVector2@N@Math@UE@@@Z)
> MyBlueprintFunctionLibrary.cpp.obj : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: virtual__cdecl FWidgetRenderer::~FWidgetRenderer(void)" (__imp_??1FWidgetRenderer@@UEAA@XZ) non risolto nella funzione "public: virtual void *__cdecl FWidgetRenderer::`scalar deleting destructor'(unsigned int)" (??_GFWidgetRenderer@@UEAAPEAXI@Z)
> MyBlueprintFunctionLibrary.cpp.obj : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: void__cdecl FWidgetRenderer::DrawWidget(class UTextureRenderTarget2D *,class TSharedRef<class SWidget,1> const &,struct UE::Math::TVector2<double>,float,bool)" (__imp_?DrawWidget@FWidgetRenderer@@QEAAXPEAVUTextureRenderTarget2D@@AEBV?$TSharedRef@VSWidget@@$00@@U?$TVector2@N@Math@UE@@M_N@Z) non risolto nella funzione "private: static class UTextureRenderTarget2D *__cdecl UMyBlueprintFunctionLibrary::WidgetToRenderTarget(class UTextureRenderTarget2D *,class UWidget *,struct UE::Math::TVector2<double>)" (?WidgetToRenderTarget@UMyBlueprintFunctionLibrary@@CAPEAVUTextureRenderTarget2D@@PEAV2@PEAVUWidget@@U?$TVector2@N@Math@UE@@@Z)
> MyBlueprintFunctionLibrary.cpp.obj : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) public: class TSharedRef<class SWidget,1>__cdecl UWidget::TakeWidget(void)" (__imp_?TakeWidget@UWidget@@QEAA?AV?$TSharedRef@VSWidget@@$00@@XZ) non risolto nella funzione "private: static class UTextureRenderTarget2D *__cdecl UMyBlueprintFunctionLibrary::WidgetToRenderTarget(class UTextureRenderTarget2D *,class UWidget *,struct UE::Math::TVector2<double>)" (?WidgetToRenderTarget@UMyBlueprintFunctionLibrary@@CAPEAVUTextureRenderTarget2D@@PEAV2@PEAVUWidget@@U?$TVector2@N@Math@UE@@@Z)
> MyBlueprintFunctionLibrary.cpp.obj : error LNK2001: simbolo esterno "public: virtual void __cdecl FDeferredCleanupInterface::FinishCleanup(void)" (?FinishCleanup@FDeferredCleanupInterface@@UEAAXXZ) non risolto
> MyBlueprintFunctionLibrary.gen.cpp.obj : error LNK2019: riferimento al simbolo esterno "__declspec(dllimport) class UClass *__cdecl Z_Construct_UClass_UWidget_NoRegister(void)" (__imp_?Z_Construct_UClass_UWidget_NoRegister@@YAPEAVUClass@@XZ) non risolto nella funzione "void__cdecl `dynamic initializer for 'public: static struct UECodeGen_Private::FObjectPropertyParams const Z_Construct_UFunction_UMyBlueprintFunctionLibrary_ExportWidgetsToDisk_Statics::NewProp_Widgets_Inner''(void)" (??__E?NewProp_Widgets_Inner@Z_Construct_UFunction_UMyBlueprintFunctionLibrary_ExportWidgetsToDisk_Statics@@2UFObjectPropertyParams@UECodeGen_Private@@B@@YAXXZ)
> C:\Users\valer\Documents\Unreal Projects\ProvaLibrary\Binaries\Win64\UnrealEditor-ProvaLibrary.patch_0.exe : fatal error LNK1120: 6 esterni non risolti
> Failed to link patch (0.000s) (Exit code: 0x460)
> ---------- Finished (0.000s) ----------

```

Sorry but I m unable to get the error completely in ENG.

Ps: I m Using UE5.0.3 and Visual Studio 2022

2022-08-23T16:56:00Z

---

<div class="post-metadata">

**Author:** ![kribbeck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kribbeck](https://forums.unrealengine.com/u/kribbeck)\
**Post date:** [August 25, 2022, 1:38am UTC](https://forums.unrealengine.com/t/cant-build-my-project-c-and-blueprint-blueprintfunction/632787/2 "2022-08-25T01:38:18Z")

</div>

Hey @valeriorobert. Are you including the UMG module in your project’s dependencies? If not, go to the Build.cs file (it si inside your project Source folder) and in the line that lists your public module dependencies (there is a list of strings) just add “UMG” to the list.

If this doesn’t work I suggest trying to delete the following folders in your project: Binaries, Intermediate, Saved and DerivedDataCache. Then regenerate your project files and finally recompile your project.

Let me know if any of these work. Hope this helps!

---

<div class="post-metadata">

**Author:** ![valeriorobert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@valeriorobert](https://forums.unrealengine.com/u/valeriorobert)\
**Post date:** [August 25, 2022, 11:54am UTC](https://forums.unrealengine.com/t/cant-build-my-project-c-and-blueprint-blueprintfunction/632787/3 "2022-08-25T11:54:22Z")

</div>

Thank you so much @kribbeck !  
Was the “UMG” dependecies

I love you \<3
