# Atomic.h Error in all new Projects

**URL:** <https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 29, 2018, 4:40am UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685 "2018-08-29T04:40:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![LostyCode](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LostyCode](https://forums.unrealengine.com/u/LostyCode)\
**Post date:** [August 29, 2018, 4:40am UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/1 "2018-08-29T04:40:19Z")

</div>

In all my projects (New and Old) I have an error that appears before any code is added or changed

```
E0018	expected a ')'	UE4	C:\Program Files\Epic Games\UE_4.20\Engine\Source\Runtime\Core\Public\Templates\Atomic.h	188	

```

When I add an actor or begin to edit code a number of cannot open source file error also appear

Error (active) E1696 cannot open source file “ActorComponent.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Components\ActorComponent.h 17   
Error (active) E1696 cannot open source file “ChildActorComponent.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Components\ChildActorComponent.h 11   
Error (active) E1696 cannot open source file “SceneComponent.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Components\SceneComponent.h 13   
Error (active) E1696 cannot open source file “EdGraphNode.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\EdGraph\EdGraphNode.h 10   
Error (active) E1696 cannot open source file “EdGraphPin.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\EdGraph\EdGraphPin.h 13   
Error (active) E1696 cannot open source file “EngineBaseTypes.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Engine\EngineBaseTypes.h 17   
Error (active) E1696 cannot open source file “EngineTypes.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Engine\EngineTypes.h 16   
Error (active) E1696 cannot open source file “Level.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Engine\Level.h 17   
Error (active) E1696 cannot open source file “MaterialMerging.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Engine\MaterialMerging.h 8   
Error (active) E1696 cannot open source file “NetSerialization.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Engine\NetSerialization.h 19   
Error (active) E1696 cannot open source file “Actor.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\GameFramework\Actor.h 21   
Error (active) E1696 cannot open source file “Interface\_AssetUserData.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\Engine\Classes\Interfaces\Interface\_AssetUserData.h 10   
Error (active) E1696 cannot open source file “InputCoreTypes.generated.h” MyProject C:\Program Files\Epic Games\UE\_4.20\Engine\Source\Runtime\InputCore\Classes\InputCoreTypes.h 10

Are these errors that need to be fixed?

---

<div class="post-metadata">

**Author:** ![shootiee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shootiee](https://forums.unrealengine.com/u/shootiee)\
**Post date:** [August 29, 2018, 5:51pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/2 "2018-08-29T17:51:51Z")

</div>

i have the same error too, any fixes?

---

<div class="post-metadata">

**Author:** ![solarisx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@solarisx](https://forums.unrealengine.com/u/solarisx)\
**Post date:** [August 30, 2018, 12:09pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/3 "2018-08-30T12:09:19Z")

</div>

same error.

---

<div class="post-metadata">

**Author:** ![solarisx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@solarisx](https://forums.unrealengine.com/u/solarisx)\
**Post date:** [August 30, 2018, 1:06pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/4 "2018-08-30T13:06:59Z")

</div>

Had the same error and fixed it. It was a missing module in my Build.cs. I fixed it by adding the “ApplicationCore” module to PublicDependencyModuleNames.

Do you have any ‘unresolved external symbol’ errors?

---

<div class="post-metadata">

**Author:** ![KWS](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kws/32/578736_2.png) [@KWS](https://forums.unrealengine.com/u/KWS)\
**Post date:** [August 31, 2018, 4:31pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/5 "2018-08-31T16:31:01Z")

</div>

These are 2 different issues.

The second issue is apparently fixed in 4.20.3. but you can follow the steps in [this forum post][1] if you can’t wait.

The first issue with atomic.h.

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/5/5856c541cdab855da1a15854ab90ebcc1cffef22.png)

I am also experiencing this. I’m guessing it’s a side-effect/bug of VS2017’s recent improvements in Template handling. It’s not really an error but Intellisense is failing to read it properly?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_231de5ce](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_231de5ce](https://forums.unrealengine.com/u/anonymous_user_231de5ce)\
**Post date:** [September 1, 2018, 9:18pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/6 "2018-09-01T21:18:07Z")

</div>

Hi, i’m new in unreal, please can you explain me how to add the ApplicationCore to PublicDepenency. Thank you so much

---

<div class="post-metadata">

**Author:** ![Gamewizard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gamewizard](https://forums.unrealengine.com/u/Gamewizard)\
**Post date:** [September 3, 2018, 2:33pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/7 "2018-09-03T14:33:14Z")

</div>

Yes please… Same here

---

<div class="post-metadata">

**Author:** ![solarisx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@solarisx](https://forums.unrealengine.com/u/solarisx)\
**Post date:** [September 4, 2018, 8:09am UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/8 "2018-09-04T08:09:01Z")

</div>

You may not be missing the same module. In my case it was the ApplicationCore.

To add a module, open the ‘Source’ folder of your game. There should be a build file. Like ‘MyGame.Build.cs’.  
There you have to extend the line with the module your game is missing.  
For example:

```
PublicDependencyModuleNames.AddRange(new string[] { "ApplicationCore", and the other game modules for your game});
```

---

<div class="post-metadata">

**Author:** ![Arty-McLabin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arty-mclabin/32/1012076_2.png) [@Arty-McLabin](https://forums.unrealengine.com/u/Arty-McLabin)\
**Post date:** [September 7, 2018, 5:48pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/9 "2018-09-07T17:48:33Z")

</div>

it didn’t help in my case. my issue is "E0018 expected a ‘)’ ". does your solution address the second issue of the question instead maybe?

---

<div class="post-metadata">

**Author:** ![yamasuyama](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yamasuyama](https://forums.unrealengine.com/u/yamasuyama)\
**Post date:** [September 19, 2018, 1:12pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/10 "2018-09-19T13:12:54Z")

</div>

I had same issue too.  
Error is fixed by adding () around [UE4Atomic\_Private::TIsSupportedSize::Value] , but I don’t know why. And I can’t guarantee it is safe.

```
template <typename T>
struct alignas((UE4Atomic_Private::TIsSupportedSize<sizeof(T)>::Value) ? alignof(UE4Atomic_Private::TUnderlyingIntegerType_T<T>) : alignof(T)) TAtomicBase_Basic
```

---

<div class="post-metadata">

**Author:** ![Yusuf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yusuf](https://forums.unrealengine.com/u/Yusuf)\
**Post date:** [September 19, 2018, 1:33pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/11 "2018-09-19T13:33:01Z")

</div>

I had same error few days ago. I updated VS 2017 (community edition) then error disappeared.

---

<div class="post-metadata">

**Author:** ![LXFrontier](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LXFrontier](https://forums.unrealengine.com/u/LXFrontier)\
**Post date:** [October 5, 2018, 10:29pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/12 "2018-10-05T22:29:31Z")

</div>

I just woke up this morning to find that I had the same error. I turned off ransomware protection in Windows Defender and everything compiled beautifully. No idea why it would start doing this now after a few months.

---

<div class="post-metadata">

**Author:** ![Pampersrocka](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pampersrocka](https://forums.unrealengine.com/u/Pampersrocka)\
**Post date:** [October 9, 2018, 1:58pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/13 "2018-10-09T13:58:51Z")

</div>

Adding the parenthesis there is fine, this does not change the implemented behavior.

---

<div class="post-metadata">

**Author:** ![returnVoid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@returnVoid](https://forums.unrealengine.com/u/returnVoid)\
**Post date:** [November 14, 2018, 2:58pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/14 "2018-11-14T14:58:46Z")

</div>

If you are not using C++ i cannot help you, but if you do have access to your code, there’s a file called: [ProjectName].Build.cs, in there you’ll find at line 11 the list of your dependencies, just add ApplicationCore in there

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e168914d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e168914d](https://forums.unrealengine.com/u/anonymous_user_e168914d)\
**Post date:** [November 16, 2018, 9:18pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/15 "2018-11-16T21:18:11Z")

</div>

When upgrading to VS 2017, enums are no longer implicitly treated as integers.

You can resolve this issue by casting the Enum to an int in the evaluation.

struct alignas((int) UE4Atomic\_Private::TIsSupportedSize::Value ? alignof(UE4Atomic\_Private::TUnderlyingIntegerType\_T) : alignof(T)) TAtomicBase\_Basic

Its a lot of crap just to get a compile time constant that can be passed into a template argument.

This occurs in at least 4.19 and forward when building with VS 2017.

Its not a virus. Its Visual Studio 2017.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1e4cd5d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1e4cd5d](https://forums.unrealengine.com/u/anonymous_user_a1e4cd5d)\
**Post date:** [November 22, 2018, 1:32am UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/16 "2018-11-22T01:32:30Z")

</div>

After 2 days stuck on this I had tried all of the above, and then figured it might be something to do with the fact that I installed everything I could on D drive to save space on my SSD… I tried uninstalling UE4 and Visual Studio, reinstalled the latest versions (2017 VS and 4.21 UE4) and let it all install into the default places on C drive.

Everything is working fine, at the cost of 1/4 of my C drive. Thought I’d post in case anyone else tries all the troubleshooting tips and can’t fix it. Still using Perforce on my D, no problems so far (only about 6 hours ago so we’ll see).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9630aff3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9630aff3](https://forums.unrealengine.com/u/anonymous_user_9630aff3)\
**Post date:** [January 1, 2019, 5:38pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/17 "2019-01-01T17:38:58Z")

</div>

All have I tried,however it doesn’t work.I add “ApplicationCore”,and I add “()”,and I update visual studio 2017,and I use UE4.20,but I still have these errors.I try to create an empty C++ project and create a new C++ class,then these error come out.Does Anybody know what I shoud do to let these error disappear?I really have no idea.

---

<div class="post-metadata">

**Author:** ![Foxhollow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Foxhollow](https://forums.unrealengine.com/u/Foxhollow)\
**Post date:** [January 4, 2019, 11:34am UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/18 "2019-01-04T11:34:50Z")

</div>

Had the same issue in 4.21.1, your solution helps, thanks

---

<div class="post-metadata">

**Author:** ![ahmadsy1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ahmadsy1](https://forums.unrealengine.com/u/ahmadsy1)\
**Post date:** [January 16, 2019, 11:04am UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/19 "2019-01-16T11:04:23Z")

</div>

Guys! It’s helpful for me :

struct alignas((int)UE4Atomic\_Private::TIsSupportedSize::Value ? alignof(UE4Atomic\_Private::TUnderlyingIntegerType\_T) : alignof(T)) TAtomicBase\_Basic

it has some different comparison with DanHollingworth but now it works fine for me and Intelligence don’t tell me about this stupid error.

 ![265552-2019-01-16-14-05-44.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/4/01451d7cf6270ccbb8410308b2cbbb85474c898d.png)

---

<div class="post-metadata">

**Author:** ![Yashinski](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yashinski](https://forums.unrealengine.com/u/Yashinski)\
**Post date:** [March 5, 2019, 1:28pm UTC](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685/20 "2019-03-05T13:28:28Z")

</div>

This solved the problem for me, thanks

[Next page](https://forums.unrealengine.com/t/atomic-h-error-in-all-new-projects/432685.md?page=2)
