# Please help me figure out how to add a C++ class to the Blueprint project.

**URL:** <https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948>\
**Category:** C++\
**Tags:** crash, unreal-engine, editor, CPP, question\
**Created:** [March 27, 2024, 2:49am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948 "2024-03-27T02:49:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Furry\_fury\_cat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_fury\_cat](https://forums.unrealengine.com/u/Furry_fury_cat)\
**Post date:** [March 27, 2024, 2:49am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/1 "2024-03-27T02:49:45Z")

</div>

**Please help me figure out how to add a C++ class to the Blueprint project.**  
I encountered a problem - I add a C++ class (using Tools → new C++ Class) (it doesn’t matter which one, which type, the error still occurs), generate Visual Studio project files (even if I don’t generate it, it doesn’t change the result), I open the sln of the project and when I try to build the project, this error appears (in the photo) and in the log there is this message - "Severity Code Description Project File Line Suppression State  
Error MSB3073 The command “F:(00A)UE5.3\engine\UE\_5.3\Engine\Build\BatchFiles\Build.bat AICarSysTestEditor Win64 Development -Project=“F:\AIcarCPP\AICarSysTest\AICarSysTest.uproject” -WaitMutex -FromMsBuild” exited with code 9009. AICarSysTest F:\Visual\_studio\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44  
". After that, when you try to open the project, the following message appears (second photo). If I start the project, it works, but without C++ Classes.

Previously, I somehow managed to create a C++ class, but now for some reason these errors appear even though I have already tried hundreds of options.

I use Visual Studio and UE5.3.2, the project was created based on the vechicle preset and Blank. As far as I know I have all the plagins I need installed, both for UE and VS

Also, please tell me how to completely delete or rename a previously created class, because if I’m not mistaken, my problems started exactly after I tried to delete/rename the created C++ class  
 ![AI_car_test_Bp_CPP - Microsoft Visual Studio 27.03.2024 4_07_44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/c/08c94c3f82e7c9987075692e09e3a99464d4e5a0.png)  
 ![Missing AI_car_test_Bp_CPP Modules 27.03.2024 4_06_24](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/4/b94a9ec5366bc80a16bfc52e0bf1b7b10389c027.png)

---

<div class="post-metadata">

**Author:** ![zhanginin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zhanginin](https://forums.unrealengine.com/u/zhanginin)\
**Post date:** [March 27, 2024, 3:23am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/2 "2024-03-27T03:23:16Z")

</div>

What is the compile error?There’s no problem with adding C++ file to a Blueprint project.It is the right way to convert Blueprint project to C++ project.

---

<div class="post-metadata">

**Author:** ![Furry\_fury\_cat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_fury\_cat](https://forums.unrealengine.com/u/Furry_fury_cat)\
**Post date:** [March 27, 2024, 11:12am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/3 "2024-03-27T11:12:13Z")

</div>

the compilation error always occurs in this file (on the screen) in line 44 (highlighted on the screen) with the log I wrote earlier. I don’t understand why this happens and how to fix it, because the error appears for some unknown reason in some system file. What can be done about it?

 ![AICarSysTest - Microsoft Visual Studio 27.03.2024 13_00_44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/a/0ea737934eed432de8dd02d84be9e69a486b96f2.png)

---

<div class="post-metadata">

**Author:** ![Ares9323](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ares9323/32/1194521_2.png) [@Ares9323](https://forums.unrealengine.com/u/Ares9323)\
**Post date:** [March 27, 2024, 11:22am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/4 "2024-03-27T11:22:28Z")

</div>

> [@Furry\_fury\_cat](#):
>
> Also, please tell me how to completely delete or rename a previously created class, because if I’m not mistaken, my problems started exactly after I tried to delete/rename the created C++ class

You have to delete them from explorer or visual studio, that can’t be done from Unreal

> [@Furry\_fury\_cat](#):
>
> Previously, I somehow managed to create a C++ class, but now for some reason these errors appear even though I have already tried hundreds of options.
> 
> I use Visual Studio and UE5.3.2, the project was created based on the vechicle preset and Blank. As far as I know I have all the plagins I need installed, both for UE and VS

Have you tried creating the vehicle preset directly in c++ instead of creating it from the BP version?

---

<div class="post-metadata">

**Author:** ![Furry\_fury\_cat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furry\_fury\_cat](https://forums.unrealengine.com/u/Furry_fury_cat)\
**Post date:** [March 27, 2024, 11:50am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/5 "2024-03-27T11:50:05Z")

</div>

> [@Ares9323](#):
>
> You have to delete them from explorer or visual studio, that can’t be done from Unreal

Okey, thank you

> [@Ares9323](#):
>
> Have you tried creating the vehicle preset directly in c++ instead of creating it from the BP version?

yes i tried but it still gives the same compile error in the same file  
also, for some reason, there were thousands more errors like:

| Severity | Code | Description | Project | File | Line | Suppression State |
| --- | --- | --- | --- | --- | --- | --- |
| Error (active) | E0276 | name followed by ‘::’ must be a class or namespace name | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 939 | |
| Error (active) | E1696 | cannot open source file UBT\_COMPILED\_PLATFORM/UBT\_COMPILED\_PLATFORMPlatformCompilerPreSetup.h | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 68 | |
| Error (active) | E1696 | cannot open source file UBT\_COMPILED\_PLATFORM/UBT\_COMPILED\_PLATFORMPlatform.h | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 126 | |
| Error (active) | E1696 | cannot open source file UBT\_COMPILED\_PLATFORM/UBT\_COMPILED\_PLATFORMPlatformCompilerSetup.h | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 1082 | |
| Error (active) | E1574 | static assertion failed with UCS2CHAR and UTF16CHAR are expected to be the same type. | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 1024 | |
| Error (active) | E1574 | static assertion failed with TCHAR should either be ANSICHAR, WIDECHAR or UTF8CHAR. | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 1028 | |
| Error (active) | E1574 | static assertion failed with WIDECHAR should be wchar\_t | UE5 | F:(00A)UE5.3\engine\UE\_5.3\Engine\Source\Runtime\Core\Public\HAL\Platform.h | 1033 | |

Please tell me what could be wrong with my Visual Studio (obviously there are no errors, but the editor still finds them)?

---

<div class="post-metadata">

**Author:** ![Ares9323](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ares9323/32/1194521_2.png) [@Ares9323](https://forums.unrealengine.com/u/Ares9323)\
**Post date:** [March 27, 2024, 12:05pm UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/6 "2024-03-27T12:05:02Z")

</div>

> [@Furry\_fury\_cat](#):
>
> Please tell me what could be wrong with my Visual Studio (obviously there are no errors, but the editor still finds them)?

These errors don’t ring me any bell, but every time I had issues generating the project files it was because I was missing something in the visual studio install (almost always .NET stuff), and once it was because of the BuildConfiguration.xml file (`C:\Users\Ares\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml`) that I had to edit as I explained in [this post](https://forums.unrealengine.com/t/visual-studio-2019-14-22-27905-must-be-installed-to-build-this-target/150754/4).

This are the individual components that you might need to check in the Visual Studio Installer (I hid the ones that I am certain are not responsible of this issue but I have way too many engine versions installed, so something might be unnecessary to you)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/2/b72c162663fd8ae504caa3ed55b40872be24f8d5.png)

---

<div class="post-metadata">

**Author:** ![zhanginin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zhanginin](https://forums.unrealengine.com/u/zhanginin)\
**Post date:** [April 8, 2024, 9:20am UTC](https://forums.unrealengine.com/t/please-help-me-figure-out-how-to-add-a-c-class-to-the-blueprint-project/1773948/7 "2024-04-08T09:20:10Z")

</div>

Reinstall your engine.If it’s compile version,delete Engine\Intermediate\ ,rerun Setup.bat and then GenerateProjectFiles.bat.I think your engine was broken for some reason.
