# Cannot compile code in editor (generated conflicts)

**URL:** <https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519>\
**Category:** C++\
**Tags:** unreal-engine, generated, UE4, question, CPP\
**Created:** [April 3, 2014, 7:00am UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519 "2014-04-03T07:00:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PixelTheory.TV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelTheory.TV](https://forums.unrealengine.com/u/PixelTheory.TV)\
**Post date:** [April 3, 2014, 7:00am UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519/1 "2014-04-03T07:00:56Z")

</div>

Hello Everyone,

So, when trying to make changes to .cpp or .h files in VS2013 and then trying to compile in the editor I am getting the following error.

Info ERROR: ‘C:/Users/Jamie/Documents/Unreal Projects/MyProject2/Intermediate/Build/Win64/Inc/MyProject2/MyProject2.generated.inl’: Changes to generated code are not allowed - conflicts written to ‘C:/Users/Jamie/Documents/Unreal Projects/MyProject2/Intermediate/Build/Win64/Inc/MyProject2/MyProject2.generated.inl.conflict’

Info Error: Failed to generate code for MyProject2

Info ERROR: UnrealHeaderTool failed for target ‘MyProject2’ (platform: Win64, module info: C:\Users\Jamie\Documents\Unreal Projects\MyProject2\Intermediate\Build\Win64\MyProject2\Development\UnrealHeaderTool.manifest).

However when I close the editor and then compile in VS2013 then re-open the editor my changes have been compiled. This is really disrupting what could be a great workflow. I assume this is something I have done?

It is the same on using github source (4.0.1 and 4.0.2)  
and the Launcher project templates.

I look forward to an answer.  
Thank you.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [April 3, 2014, 7:13am UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519/2 "2014-04-03T07:13:19Z")

</div>

If you add a new class, a new function or a new component you need to close editor, compile from VS and then reopen the editor - as long it causes changes to the editor, this is required.  
However if you are only changing the code of already existing functions then you can compile from the editor.

---

<div class="post-metadata">

**Author:** ![PixelTheory.TV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelTheory.TV](https://forums.unrealengine.com/u/PixelTheory.TV)\
**Post date:** [April 3, 2014, 3:07pm UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519/3 "2014-04-03T15:07:47Z")

</div>

I am not adding new classes. I am simply making edits to the My Character class from the FPS template… Is that error that I mentioned due to needing to restart?

---

<div class="post-metadata">

**Author:** ![DavidNyaaselhoff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidNyaaselhoff](https://forums.unrealengine.com/u/DavidNyaaselhoff)\
**Post date:** [April 8, 2014, 3:01am UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519/4 "2014-04-08T03:01:30Z")

</div>

I was seeing such same issues until I installed the VS Extension that comes in /Engine/Extras/UnrealVS/VS2013.

Then using that, setting my game as the Launcher (be sure to right click the toolbar and select “UnrealVS” to show it) and launching my game, I never saw any of these generated conflicts again.

With the game set as the launcher, I use F5 to launch an instance and hot code deploy in editor by using Ctrl Alt Shift P.

However, as EvilCleric states, you must stop the process and recompile from VS after adding new classes.

Hope you solve the issue! It was making me pull my hair out!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b4c8d46](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b4c8d46](https://forums.unrealengine.com/u/anonymous_user_3b4c8d46)\
**Post date:** [March 21, 2017, 11:27am UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519/5 "2017-03-21T11:27:03Z")

</div>

“ **compile from VS and then reopen the editor** ” This was the solution to me.  
So for anyone else having this problem, here you go, short and sweet.

---

<div class="post-metadata">

**Author:** ![01Lizard10](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@01Lizard10](https://forums.unrealengine.com/u/01Lizard10)\
**Post date:** [February 27, 2020, 4:49pm UTC](https://forums.unrealengine.com/t/cannot-compile-code-in-editor-generated-conflicts/279519/6 "2020-02-27T16:49:09Z")

</div>

I had the same problem. Found a nice workaround in this video: [UE4/Unreal Engine 4|German|v4.24.2|From Scratch – #3 Unser Characteraufsatz CPP-Ready - YouTube](https://youtu.be/TgJh4XpdOxU)  
Is in German, but you can understand the importent parts.
