Error LNK2019 when building Unreal from source

I’m close to being able to compile, but it’s having 2 errors involving HoloLensAR and WindowsMixedRealityHMD.

Windows 10, Unreal 4.6

I’ve quadruple checked that I have everything in my VS install. Only thing I can think of is perhaps I need a specific version of the Windows SDK or something.

Build started...
1>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
1>Using 'git status' to determine working set for adaptive non-unity build (C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3).
1>Waiting for 'git status' command to complete
1>Building UE4Editor and ShaderCompileWorker...
1>Using Visual Studio 2019 14.29.30151 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.22000.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 3 actions with 12 processes...
1>  [1/3] UE4Editor-HoloLensAR.dll
1>     Creating library C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3\Engine\Plugins\Runtime\WindowsMixedReality\Intermediate\Build\Win64\UE4Editor\Development\HoloLensAR\UE4Editor-HoloLensAR.suppressed.lib and object C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3\Engine\Plugins\Runtime\WindowsMixedReality\Intermediate\Build\Win64\UE4Editor\Development\HoloLensAR\UE4Editor-HoloLensAR.suppressed.exp
1>Module.HoloLensAR.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl WindowsMixedReality::MixedRealityInterop::CreateAnchor(wchar_t const *,struct DirectX::XMFLOAT3,struct DirectX::XMFLOAT4,enum WindowsMixedReality::HMDTrackingOrigin)" (__imp_?CreateAnchor@MixedRealityInterop@WindowsMixedReality@@QEAA_NPEB_WUXMFLOAT3@DirectX@@UXMFLOAT4@4@W4HMDTrackingOrigin@2@@Z) referenced in function "private: bool __cdecl FHoloLensARSystem::WMRCreateAnchor(wchar_t const *,struct FVector,struct FQuat)" (?WMRCreateAnchor@FHoloLensARSystem@@AEAA_NPEB_WUFVector@@UFQuat@@@Z)
1>Module.HoloLensAR.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl WindowsMixedReality::MixedRealityInterop::GetAnchorPose(wchar_t const *,struct DirectX::XMFLOAT3 &,struct DirectX::XMFLOAT4 &,struct DirectX::XMFLOAT3 &,enum WindowsMixedReality::HMDTrackingOrigin)const " (__imp_?GetAnchorPose@MixedRealityInterop@WindowsMixedReality@@QEBA_NPEB_WAEAUXMFLOAT3@DirectX@@AEAUXMFLOAT4@4@1W4HMDTrackingOrigin@2@@Z) referenced in function "private: bool __cdecl FHoloLensARSystem::WMRGetAnchorTransform(wchar_t const *,struct FTransform &)const " (?WMRGetAnchorTransform@FHoloLensARSystem@@AEBA_NPEB_WAEAUFTransform@@@Z)
1>C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3\Engine\Plugins\Runtime\WindowsMixedReality\Binaries\Win64\UE4Editor-HoloLensAR.dll : fatal error LNK1120: 2 unresolved externals
1>  [2/3] UE4Editor-WindowsMixedRealityHMD.dll
1>     Creating library C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3\Engine\Plugins\Runtime\WindowsMixedReality\Intermediate\Build\Win64\UE4Editor\Development\WindowsMixedRealityHMD\UE4Editor-WindowsMixedRealityHMD.suppressed.lib and object C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3\Engine\Plugins\Runtime\WindowsMixedReality\Intermediate\Build\Win64\UE4Editor\Development\WindowsMixedRealityHMD\UE4Editor-WindowsMixedRealityHMD.suppressed.exp
1>Module.WindowsMixedRealityHMD.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl WindowsMixedReality::MixedRealityInterop::GetCurrentPoseRenderThread(struct DirectX::XMMATRIX &,struct DirectX::XMMATRIX &,enum WindowsMixedReality::HMDTrackingOrigin &)" (__imp_?GetCurrentPoseRenderThread@MixedRealityInterop@WindowsMixedReality@@QEAA_NAEAUXMMATRIX@DirectX@@0AEAW4HMDTrackingOrigin@2@@Z) referenced in function "private: void __cdecl WindowsMixedReality::FWindowsMixedRealityHMD::InitTrackingFrame(void)" (?InitTrackingFrame@FWindowsMixedRealityHMD@WindowsMixedReality@@AEAAXXZ)
1>Module.WindowsMixedRealityHMD.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl WindowsMixedReality::MixedRealityInterop::QueryCoordinateSystem(struct ABI::Windows::Perception::Spatial::ISpatialCoordinateSystem * &,enum WindowsMixedReality::HMDTrackingOrigin &)" (__imp_?QueryCoordinateSystem@MixedRealityInterop@WindowsMixedReality@@SA_NAEAPEAUISpatialCoordinateSystem@Spatial@Perception@Windows@ABI@@AEAW4HMDTrackingOrigin@2@@Z) referenced in function "public: bool __cdecl WindowsMixedReality::FWindowsMixedRealityHMD::QueryCoordinateSystem(struct ABI::Windows::Perception::Spatial::ISpatialCoordinateSystem * &,enum WindowsMixedReality::HMDTrackingOrigin &)" (?QueryCoordinateSystem@FWindowsMixedRealityHMD@WindowsMixedReality@@QEAA_NAEAPEAUISpatialCoordinateSystem@Spatial@Perception@Windows@ABI@@AEAW4HMDTrackingOrigin@2@@Z)
1>C:\Users\Connorses\Fadeout-Fork-UE4-4.24.3\Engine\Plugins\Runtime\WindowsMixedReality\Binaries\Win64\UE4Editor-WindowsMixedRealityHMD.dll : fatal error LNK1120: 2 unresolved externals
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat -Target="UE4Editor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "UE4.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Seems to be related to DirectX?? I’ll update when I’m able to fresh install Windows I guess. Can’t find any other way to reinstall DirectX. ;(

Greetings @Connorses

Uninstalling/reinstalling DirectX is difficult because it’s included in most of your basic windows updates. Usually requires rolling back and then updating or even system restore in some cases. I’d start with completely uninstalling all of your GPU drivers, redownload and reinstall those. There are some third party uninstallers for that type of thing as well. I can’t really recommend one as they’re not created by us. But, I know some people like apps such as DDU to do the job. I’d start with doing that and see if that resolves it before moving into something drastic like reinstalling windows. I hope that this information is helpful!

1 Like

I’ve since gotten the engine to build. I thought my version of Visual Studio would work, but I was wrong. I highly recommend installing Visual Studio 2017 to build Unreal 4, that solved most of my problems. And make sure you follow all the steps in the github page.

Oh yeah and installing the DirectX sdk may have helped with this particular problem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.