Can't build UE 4.4.0-release (Oculus plugin build fail)

I’ve downloaded source for 4.4.0-release and deps from git, tried to build but failed.

First time it was because of incorrect dependency archive (libovr libs go to LibOVR folder instead of LibOVR_04). I copied libs to LibOVR_04 and tried to rebuild again.
Then I got other errors. Here’s build log’s fragment:

1>Creating library D:\Tim\ue4\4.4\Engine\Intermediate\Build\Win64\UE4Editor\Development\Plugins\Dynamic\UE4Editor-OculusRift.lib and object D:\Tim\ue4\4.4\Engine\Intermediate\Build\Win64\UE4Editor\Development\Plugins\Dynamic\UE4Editor-OculusRift.exp
1>Module.OculusRift.cpp.obj : error LNK2019: unresolved external symbol ovr_GetVersionString referenced in function "public: virtual bool __cdecl FOculusRiftHMD::Exec(class UWorld *,wchar_t const *,class FOutputDevice &)" (?Exec@FOculusRiftHMD@@UEAA_NPEAVUWorld@@PEB_WAEAVFOutputDevice@@@Z)
1>Module.OculusRift.cpp.obj : error LNK2019: unresolved external symbol ovrHmd_AttachToWindow referenced in function "private: void __cdecl FOculusRiftHMD::Shutdown(void)" (?Shutdown@FOculusRiftHMD@@AEAAXXZ)
1>Module.OculusRift.cpp.obj : error LNK2019: unresolved external symbol ovrHmd_ConfigureTracking referenced in function "private: void __cdecl FOculusRiftHMD::UpdateHmdCaps(void)" (?UpdateHmdCaps@FOculusRiftHMD@@AEAAXXZ)
1>Module.OculusRift.cpp.obj : error LNK2019: unresolved external symbol ovrHmd_GetTrackingState referenced in function "public: void __cdecl FOculusRiftHMD::GetCurrentPose(class FQuat &,class FVector &)const " (?GetCurrentPose@FOculusRiftHMD@@QEBAXAEAVFQuat@@AEAVFVector@@@Z)
1>Module.OculusRift.cpp.obj : error LNK2019: unresolved external symbol ovrHmd_DismissHSWDisplay referenced in function "public: virtual bool __cdecl FOculusRiftHMD::HandleInputKey(class UPlayerInput *,struct FKey const &,enum EInputEvent,float,bool)" (?HandleInputKey@FOculusRiftHMD@@UEAA_NPEAVUPlayerInput@@AEBUFKey@@W4EInputEvent@@M_N@Z)
1>D:\Tim\ue4\4.4\Engine\Plugins\OculusRift\Binaries\Win64\UE4Editor-OculusRift.dll : fatal error LNK1120: 5 unresolved externals

Same here. It looks like the OculusRift plugin was broken in the recent update.
You can still launch the editor with the plugin disabled. But you need to disable the plugin in your .uproject file OR edit Plugins/OculusRift/OculusRift.uplugin file setting “EnabledByDefault” option to false. Otherwise you will see error message at startup and the editor won’t launch.

This happened to me as well. How do I disable the occulus plugin? Where is this edit plugins menu? Inside of Visual studio?

Ahh I found it, thanks. You were saying the path to the actual file where I need to change the value in it’s code.

strange thing is that binary 4.4.0-release has this plugin. That means they compiled it somehow.

Compilation fails because a third-party binary file is missing. Binaries are not included in the repository, they are usually found in separate zip archives. So we just have to wait for updated archives.

There is lib file in archive. As I said it goes to wrong folder when unpacking.
I copied it to proper folder and it still fails to compile with error I mentioned above.

I’ll try to build with lib file downloaded from oculus developers site.

Your editor is built fine. It’s just a plugin that fails. You disable plugin to have ability to run editor without compiled oculus plugin not to get rid of build errors.

I’m still not able to build successfully. I set the EnabledByDefault to false in the occulusrift.plugin and it’s builds successfully but also fails.

Ok. Here’s the solution:

The libovr64.lib file in dependency archive is wrong version. Download sdk 0.4.1 from oculus site and copy sdk’s Lib folder to engine’s LibOVR_04 folder.

I’ve just built engine without errors.

Where is the LibOVR_04 folder? i cant find it.

Engine/Source/ThirdParty/Oculus

For anyone else running into this problem, please get the dependencies from the 4.4.1 list and use those, even with your 4.4.0 build. You can find them here:

https://github.com/EpicGames/UnrealEngine/releases/tag/4.4.1-release

Thanks!