# UE 4.10 and C++:  Additionnal help on module and header dependencies.

**URL:** https://qa.fmod.com/t/ue-4-10-and-c-additionnal-help-on-module-and-header-dependencies/12255
**Category:** Unreal Engine
**Created:** [January 20, 2016, 4:30am UTC](https://qa.fmod.com/t/ue-4-10-and-c-additionnal-help-on-module-and-header-dependencies/12255 "2016-01-20T04:30:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![narc](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@narc](https://qa.fmod.com/u/narc)
#### Post date: [January 20, 2016, 4:30am UTC](https://qa.fmod.com/t/ue-4-10-and-c-additionnal-help-on-module-and-header-dependencies/12255/1 "2016-01-20T04:30:30Z")

</div>

Hello.

Simply following _Programming with the FMOD Studio C++ API_ page, I’m having problems including the right files for using the C++ API in UE4.

I am using the full FMOD tutorial project to which I add a C++ class of an AActor to test my code.

Also, `PrivateDependencyModuleNames.AddRange(new string[] { "FMODStudio" });` is part of my Build.cs.

Here’s my code based on the example:

```
#include "FMOD_UE4_Tutorial.h"
#include "MyActor.h"
#include "FMODStudioModule.h"
#include "fmod_studio.hpp"
        
    void AMyActor::BeginPlay()
    {
    	Super::BeginPlay();
    
    	if (IFMODStudioModule::IsAvailable())
    	{
    		FMOD::Studio::System* StudioSystem = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext.Runtime);
    		if (StudioSystem)
    		{
    			// Use it here
    		}
    	}
    }

```

I needed to add `FMODStudioModule.h` so that `IFMODStudioModule::IsAvailable()` could be recognized but  
EFMODSystemContext is not recognized though it is part of the same header file.

```
2>E:\Documents\Unreal Projects\FMOD_UE4_Tutorial\Source\FMOD_UE4_Tutorial\MyActor.cpp(24): error C2882: 'EFMODSystemContext': illegal use of namespace identifier in expression
2>E:\Documents\Unreal Projects\FMOD_UE4_Tutorial\Source\FMOD_UE4_Tutorial\MyActor.cpp(24): error C2228: left of '.Runtime' must have class/struct/union

```

So what’s correct procedure ?

Regards.

---

<div class="post-metadata">

### Author: ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)
#### Post date: [January 20, 2016, 6:55am UTC](https://qa.fmod.com/t/ue-4-10-and-c-additionnal-help-on-module-and-header-dependencies/12255/2 "2016-01-20T06:55:06Z")

</div>

You’re almost there, you just need to use the enum like this:

```
EFMODSystemContext::Runtime
```

---

<div class="post-metadata">

### Author: ![narc](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@narc](https://qa.fmod.com/u/narc)
#### Post date: [January 20, 2016, 12:38pm UTC](https://qa.fmod.com/t/ue-4-10-and-c-additionnal-help-on-module-and-header-dependencies/12255/3 "2016-01-20T12:38:27Z")

</div>

> [@](#):
>
> You’re almost there, you just need to use the enum like this:
> 
> ```
> EFMODSystemContext::Runtime
> 
> ```

Of course. It’s an Enum, silly me. :-).

Then someone should change the code on the tutorial page. It’s clearly marked as a dot (In fact, my code is a copy & paste).

Thanks a bunch, Geoff.

---

<div class="post-metadata">

### Author: ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)
#### Post date: [January 20, 2016, 11:15pm UTC](https://qa.fmod.com/t/ue-4-10-and-c-additionnal-help-on-module-and-header-dependencies/12255/4 "2016-01-20T23:15:04Z")

</div>

Ah, thanks for letting me know. It will be fixed for the next version.
