MixedRealityCompanionKit
MixedRealityCompanionKit copied to clipboard
Unable to build MixedRemoteViewCompositor: 'MFSampleExtension_PinholeCameraIntrinsics': redefinition; multiple initialization
I'm in urgent need of a POV live-view from the HoloLens for a presentation and demonstration in front of an audience. As normal live-view is not an option (too large delay), I have found the LowLatencyMRC.
However, I'm having problems when trying to build the MixedRemoteViewCompositor required for the Unity plugin and the Viewer.
I'm running Windows 10 Creators Update 64-Bit and Visual Studio 2017.
When opening the MixedRemoteViewCompositor.sln I'm greeted with a Retarget Solution Dialogue to Windows SDK Version 10.0.15063.0 and Platform Toolset v141.
To be able to build the WSA or Win32 Solution, I also have to manually retarget them as well.
However, once I try to build the WSA or Win32 Project (in x86 and Release), I get the following error:

Severity Code Description Project File Line Suppression State Error C2374 'MFSampleExtension_PinholeCameraIntrinsics': redefinition; multiple initialization WSA c:[...]\hololenscompanionkit\mixedremoteviewcompositor\source\shared\pch.h 78
Because of this error, I'm unable to build the Viewer or the DLLs required for the MrvcManager.
Any idea how this error can be fixed? Any idea what I'm doing wrong? Can someone provide me with prebuilt DLLs? This is very urgent.
For anyone facing the same problem, I was still not able to build the DLL. However, the 32-bit DLL's can still be found in an earlier commit: https://github.com/Microsoft/HoloLensCompanionKit/tree/034fef01ce835c0bff469b7c4a616daa1c5acbeb
Were you ever able to get these earlier dlls integrated and running on your project?
I have the same problem building with VS 2015 and 2017. I downloaded the pre-built DLL from that earlier commit but now the problem is in Unity.
DllNotFoundException: MixedRemoteViewCompositor MixedRemoteViewCompositor.Plugin.Awake () (at Assets/AddOns/MixedRemoteViewCompositor/Scripts/Interop/Plugin.cs:64)
DllNotFoundException: MixedRemoteViewCompositor MixedRemoteViewCompositor.Plugin.OnDisable () (at Assets/AddOns/MixedRemoteViewCompositor/Scripts/Interop/Plugin.cs:74)
I saw another post where they advice to build the DLL for x64 to avoid these errors in Unity, but I'm stuck with that 'MFSampleExtension_PinholeCameraIntrinsics' error.
I'm facing the same problem. All tools updated at FallCreatorsUpdate release.
No official solution? It seams that spectator view tool is up to date, instead MRVC is unsupported since Nov16
I only update the v140 MSBuild Tools. If I change the Windows SDK to something other than 10586, it won't build anymore.
I think it's because this issue: https://github.com/Microsoft/MixedRealityCompanionKit/issues/13 Apparently, this is built on SDK 10240 and asking for 1.0 version of API (located here C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.FoundationContract\1.0.0.0). Any freshly installed Win 10 after Anniversary edition (comes with SDK 10586) will have 2.0 API only. SDK 10586 will not install API 1.0 for you, make sure you install SDK 10240 and 10586. VS2017 with MSBuild Tools v141 is fine, as long as you keep the SDK 10240 or 10586 when you retarget the solution to use Build Toools v141 in VS 2017.
Look at https://github.com/Microsoft/MixedRealityToolkit-Unity/pull/1308 for an example of how to check the windows API compatibility.
@chris-han - your note on making sure you added 10240 was key - thanks :)
I can confirm that in the MixedRemoteViewCompositor solution, the Win32 and WSA projects both had on their properties the Target platform and Min version at 10.0.10586.0 and Platform Toolset: Visual Studio 2017 (v141). Yet I'm getting the same error. I have Fall Creators Update FWIW. I have 10586 installed but nothing compiled until I installed 10240 as I was getting "Failed to load a dependency file. Windows.Winmd (Invalid path for /metadata_dir switch - "C:\Program Files (x86)\Windows Kits\10\References\windows.foundation.foundationcontract\1.0.0.0")"
I got them to build. I re-targeted the WSA to v141 (right click on it in Solution Explorer), but did not change the SDK's. For the win32, I installed both 240 and 586 SDK's and then the v140 for desktop. All installs from the Visual Studio Tools->Get Tools and features. I have not yet really tested the built plugins though so caveat emptor on these advices. ;-) (Visual Studio v. 15.8.0. Microsoft Visual Studio Enterprice 2017.)