# Error building 4.16 branch from source - can't build Oculus lib

**URL:** <https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603>\
**Category:** Mobile\
**Tags:** UE4-16, build, unreal-engine, editor, CPP, question\
**Created:** [May 14, 2017, 9:37pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603 "2017-05-14T21:37:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![philboltt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philboltt](https://forums.unrealengine.com/u/philboltt)\
**Post date:** [May 14, 2017, 9:37pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/1 "2017-05-14T21:37:32Z")

</div>

Hi All,

I need to do an engine rebuild so that I can disable audio muting when the VR preview window becomes defocussed (would be great to have that exposed as an editor preference 🙂 ). I cloned the 4.16 branch from github, followed all the normal steps, but have run into this error:

```
2>d:\workspace\unrealengine\engine\source\runtime\d3d12rhi\private\D3D12StateCachePrivate.h(716): error C4596: 'SetPipelineState': illegal qualified name in member declaration
2>d:\workspace\unrealengine\engine\source\runtime\d3d12rhi\private\D3D12StateCachePrivate.h(716): error C4596: 'SetPipelineState': illegal qualified name in member declaration
2>ERROR : UBT error : Failed to produce item: D:\workspace\UnrealEngine\Engine\Plugins\Runtime\OculusRift\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OculusRift.lib

```

I’ve successfully build many engine versions before, but this is a completely new error to me and is a bit beyond me. I’m guessing that this must be something particular to my setup but am at a loss of things to try to resolve it. Does anyone have any words of advice they could share?

Building on Windows 10 using Visual Studio 2017,

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [May 14, 2017, 10:41pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/2 "2017-05-14T22:41:20Z")

</div>

Hi!

Since 4.16 is a preview, you could be running into a bug Epic didn’t catch. I can see that the file in question was changed 13 days ago. Try working with 4.15.2 and see if you get the same issue. In general, it’s not quite safe to do real development with a preview version.

It might also be helpful to submit a bug so Epic can look into it before 4.16 is put into production. You can do that here: [https://answers.unrealengine.com/spaces/11/bugs-and-crashes.html](https://answers.unrealengine.com/spaces/11/bugs-and-crashes.html).

If you have this problem with 4.15.2 then we can try to dig deeper.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [May 14, 2017, 10:49pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/3 "2017-05-14T22:49:32Z")

</div>

Actually, I see that SetPipelineState() used to just be declared but now it’s implemented in the header, with a template statement in front of it. That may be causing the problem. Looks like the change was done via this PR: .com/EpicGames/UnrealEngine/pull/3512. You may want to talk to the devs involved in that. You may be able to help them if something isn’t right with their changes.

---

<div class="post-metadata">

**Author:** ![philboltt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philboltt](https://forums.unrealengine.com/u/philboltt)\
**Post date:** [May 14, 2017, 11:28pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/4 "2017-05-14T23:28:50Z")

</div>

Thanks @anonymous_user_64f7311b, that’s very helpful. Will try building 4.15.2

---

<div class="post-metadata">

**Author:** ![philboltt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philboltt](https://forums.unrealengine.com/u/philboltt)\
**Post date:** [May 15, 2017, 10:10pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/5 "2017-05-15T22:10:27Z")

</div>

As a complete aside, I discovered after the fact that I could change this without recompiling the engine by setting this variable in Config/DefaultEngine.ini:

```
[Audio]
 UnfocusedVolumeMultiplier=1.0

```

Ah well… at least the effort seems to have uncovered a bug. Time well spent.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [May 15, 2017, 10:26pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/6 "2017-05-15T22:26:17Z")

</div>

LOL. Been there…

---

<div class="post-metadata">

**Author:** ![theslickmeister](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@theslickmeister](https://forums.unrealengine.com/u/theslickmeister)\
**Post date:** [May 18, 2017, 9:28am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/7 "2017-05-18T09:28:20Z")

</div>

Change

> D3D12\_STATE\_CACHE\_INLINE void  
> FD3D12StateCacheBase::SetPipelineState(FD3D12PipelineState\*  
> PSO)

to

> D3D12\_STATE\_CACHE\_INLINE void  
> SetPipelineState(FD3D12PipelineState\*  
> PSO)

i.e. remove “FD3D12StateCacheBase::” as it isn’t needed and VS2017 throws an error for it.

Andrew

---

<div class="post-metadata">

**Author:** ![philboltt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philboltt](https://forums.unrealengine.com/u/philboltt)\
**Post date:** [May 23, 2017, 4:40am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/8 "2017-05-23T04:40:02Z")

</div>

Thanks Andrew! @, did you see this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [May 24, 2017, 8:48pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/9 "2017-05-24T20:48:30Z")

</div>

Yes I did. I’m looking into it now. We have other people on our QA team who haven’t reported any issues like this so I’m collaborating with them about it.

---

<div class="post-metadata">

**Author:** ![theslickmeister](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@theslickmeister](https://forums.unrealengine.com/u/theslickmeister)\
**Post date:** [May 25, 2017, 8:47am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/10 "2017-05-25T08:47:47Z")

</div>

From what we’ve seen it only seems to affect Visual Studio Community 2017 from Version 15.1 (mine specifically is the 26403.7 release). VSC2017 without an update is unaffected.

---

<div class="post-metadata">

**Author:** ![philboltt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philboltt](https://forums.unrealengine.com/u/philboltt)\
**Post date:** [May 25, 2017, 9:00am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/11 "2017-05-25T09:00:04Z")

</div>

Interesting. The version that I’ve been building with is

```
Microsoft Visual Studio Community 2017 
Version 15.2 (26430.4) Release
VisualStudio.15.Release/15.2.0+26430.4
Microsoft .NET Framework
Version 4.7.02046

```

Not quite the same, but close. Are you saying that the problem occurs with the latest updates?

---

<div class="post-metadata">

**Author:** ![theslickmeister](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@theslickmeister](https://forums.unrealengine.com/u/theslickmeister)\
**Post date:** [May 25, 2017, 9:05am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/12 "2017-05-25T09:05:56Z")

</div>

Yeah, the error seems to have been introduced in the first update

---

<div class="post-metadata">

**Author:** ![wingedrobin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wingedrobin](https://forums.unrealengine.com/u/wingedrobin)\
**Post date:** [May 25, 2017, 4:32pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/13 "2017-05-25T16:32:12Z")

</div>

I got the same issue, and the version of my VS Community 2017 is 15.2 (26430.6)

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 29, 2017, 2:54pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/14 "2017-05-29T14:54:10Z")

</div>

I’ve had this too, I did a completely clean Windows Installation before merging in the the 4.16 ‘release’ changes if that helps.

---

<div class="post-metadata">

**Author:** ![philboltt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philboltt](https://forums.unrealengine.com/u/philboltt)\
**Post date:** [June 14, 2017, 8:47pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/15 "2017-06-14T20:47:05Z")

</div>

Hey, you’ll need to post the output log from Visual Studio for anyone to have a chance at helping you. Otherwise no-one can see what the error actually is.

---

<div class="post-metadata">

**Author:** ![urinal-cake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@urinal-cake](https://forums.unrealengine.com/u/urinal-cake)\
**Post date:** [June 15, 2017, 12:56am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/16 "2017-06-15T00:56:35Z")

</div>

I had this issue on a build controller that only had Microsoft SDK 10, .NET 4.6.1 and Microsoft Build Tools installed.

---

<div class="post-metadata">

**Author:** ![aecastaneda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aecastaneda](https://forums.unrealengine.com/u/aecastaneda)\
**Post date:** [July 8, 2017, 11:14pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/17 "2017-07-08T23:14:04Z")

</div>

I just ran into the same problem and as previously posted, removing FD3D12StateCacheBase:: from the file D3D12StateCachePrivate.h fixed the problem for me as well. I’m compiling the latest 4.16 source from GIT and using Visual Studio Community 2017 (Version 15.2 26430.15).

---

<div class="post-metadata">

**Author:** ![Talad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Talad](https://forums.unrealengine.com/u/Talad)\
**Post date:** [August 1, 2017, 2:40pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/18 "2017-08-01T14:40:34Z")

</div>

The problem still persists in 4.16.3-release with VS 2017 Community 15.2 (26430.16). The suggested fix below works.

---

<div class="post-metadata">

**Author:** ![wbDHaderer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wbDHaderer](https://forums.unrealengine.com/u/wbDHaderer)\
**Post date:** [August 7, 2017, 9:51am UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/19 "2017-08-07T09:51:16Z")

</div>

thanks mate!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f77a82de](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f77a82de](https://forums.unrealengine.com/u/anonymous_user_f77a82de)\
**Post date:** [October 13, 2017, 4:10pm UTC](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603/20 "2017-10-13T16:10:03Z")

</div>

I’ve had the same issue, windows 10, visual studio community 2017 4.16.3, what in the world is going on here…?

[Next page](https://forums.unrealengine.com/t/error-building-4-16-branch-from-source-cant-build-oculus-lib/393603.md?page=2)
