# Error Blueprint Function library Build

**URL:** <https://forums.unrealengine.com/t/error-blueprint-function-library-build/419132>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, CPP, Blueprint, question\
**Created:** [March 6, 2018, 6:24pm UTC](https://forums.unrealengine.com/t/error-blueprint-function-library-build/419132 "2018-03-06T18:24:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_c605344f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c605344f](https://forums.unrealengine.com/u/anonymous_user_c605344f)\
**Post date:** [March 6, 2018, 6:24pm UTC](https://forums.unrealengine.com/t/error-blueprint-function-library-build/419132/1 "2018-03-06T18:24:35Z")

</div>

Hello,  
I’m trying to compile this code without success to add it to my function library but I’m constantly falling back on these compilation errors that I can’t understand where the problem comes from.

Need help please

the code I’m trying to compile is as follows :

> **[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...

1\>------ Début de la génération : Projet : MyProject, Configuration : Development\_Editor x64 ------  
1\>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(31,3): warning MSB4011: “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Makefile.props” ne peut pas être réimporté car il a déjà été importé à “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.cpp.props (31,3)”. Il s’agit probablement d’une erreur de création de build. Cette importation est ignorée. [C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Intermediate\ProjectFiles\MyProject.vcxproj]  
1\>Compiling game modules for hot reload  
1\>Parsing headers for MyProjectEditor  
1\> Running UnrealHeaderTool “C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\MyProject.uproject” “C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed  
1\>Reflection code generated for MyProjectEditor in 11,1707875 seconds  
1\>Performing 5 actions (4 in parallel)  
1\>MyProject.init.gen.cpp  
1\>VictoryBPFunctionLibrary.cpp  
1\>VictoryBPFunctionLibrary.gen.cpp  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(11): error C2653: ‘UVictoryBPFunctionLibrary’: is not a class or namespace name  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(12): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(13): error C2550: ‘UVictoryBPFunctionLibrary’: constructor initializer lists are only allowed on constructor definitions  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(15): error C4508: ‘UVictoryBPFunctionLibrary’: function should return a value; ‘void’ return type assumed  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(18): error C2653: ‘UVictoryBPFunctionLibrary’: is not a class or namespace name  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(23): error C2653: ‘UVictoryBPFunctionLibrary’: is not a class or namespace name  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(30): error C2065: ‘GFileManager’: undeclared identifier  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(33): error C2065: ‘GFileManager’: undeclared identifier  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(33): error C2227: left of ‘-\>DirectoryExists’ must point to class/struct/union/generic type  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(33): note: type is ‘unknown-type’  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(36): error C2065: ‘GFileManager’: undeclared identifier  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(36): error C2227: left of ‘-\>MakeDirectory’ must point to class/struct/union/generic type  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(36): note: type is ‘unknown-type’  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(39): error C2065: ‘GFileManager’: undeclared identifier  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(39): error C2227: left of ‘-\>DirectoryExists’ must point to class/struct/union/generic type  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(39): note: type is ‘unknown-type’  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(55): error C2065: ‘GFileManager’: undeclared identifier  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(55): error C2227: left of ‘-\>GetFileAgeSeconds’ must point to class/struct/union/generic type  
1\>C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Source\MyProject\VictoryBPFunctionLibrary.cpp(55): note: type is ‘unknown-type’  
1\>ERROR : UBT error : Failed to produce item: C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject-8954.dll  
1\>Total build time: 16,18 seconds (Local executor: 0,00 seconds)  
1\>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: La commande ““C:\Program Files\Epic Games\UE\_4.18\Engine\Build\BatchFiles\Build.bat” MyProjectEditor Win64 Development “C:\Users\SIrin\_NugDev\Documents\Unreal Projects\MyProject\MyProject.uproject” -waitmutex” s’est arrêtée avec le code 5. Assurez-vous d’avoir les droits suffisants pour exécuter cette commande.  
1\>Génération du projet “MyProject.vcxproj” terminée – ÉCHEC.  
========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

---

<div class="post-metadata">

**Author:** ![Atheist91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atheist91](https://forums.unrealengine.com/u/Atheist91)\
**Post date:** [March 7, 2018, 1:47pm UTC](https://forums.unrealengine.com/t/error-blueprint-function-library-build/419132/2 "2018-03-07T13:47:00Z")

</div>

Hello.

The code you’re trying to compile contains type that doesn’t exist anymore (GFileManager).  
The source you can see in that tutorial is extremely old and I’m not sure if it’ll even work, but GFileManager was possible replaced with **IFileManager**. You can get it like so:

```
IFileManager::Get()

```

Keep in mind tho, that it returns **reference** (not a pointer) so you’ll have to change the way you call functions on it (change arrows[-\>] to dots[.]). Example:

```
// Old code
GFileManager->DirectoryExists( *SaveDirectory)

// New code:
IFileManager::Get().DirectoryExists( *SaveDirectory)

```

Also, some/most of the functions used in tutorial might have change into different ones so you’d have to check **FileHelper.h** and see if you can find something that would work for you. Also, you might have to include that file in your .cpp file.

Cheers.
