Jump to content

Unresolved External Symbol in UE4 C++ Class


EashBala

Recommended Posts

Hi,

So I am trying to build a VR game in UE4 using the Vive Focus 3 and I want the headset to tell me when it loses tracking for a safety precaution. In my C++ Pawn Class, I have a function that should return whether or not the headset lost tracking. It uses a external class from Wave that should return a bool if the device does actually lose tracking.
 

Quote

int AMyPawn::isLossTracking()
{
    //this headset lost tracking
    if (WVR_GetDeviceErrorState(WVR_DeviceType_HMD, WVR_DeviceErrorStatus_DeviceLostTracking))
    {
        return 1;
    }
    //there is no problem with the headset
    else if(WVR_GetDeviceErrorState(WVR_DeviceType_HMD, WVR_DeviceErrorStatus_None))
    {
        return 2;
    }
    else
    {
        //cannot find the function
        return 0;
    }    
}


Although the code is clearly able to find the declaration of these functions and variables, once it gets to building, it gives me an unresolved external symbol error.

 

Quote


Error    LNK2019    unresolved external symbol WVR_GetDeviceErrorState referenced in function "public: int __cdecl AMyPawn::isLossTracking(void)" (?isLossTracking@AMyPawn@@QEAAHXZ)    TestViveProj_00    C:\Users\tech\Perforce\Tower_ViveFocus3_01\Research\Vive\TestViveProj_00\Intermediate\ProjectFiles\MyPawn.cpp.obj    1    

Error    LNK1120    1 unresolved externals    TestViveProj_00    C:\Users\tech\Perforce\Tower_ViveFocus3_01\Research\Vive\TestViveProj_00\Binaries\Win64\UE4Editor-TestViveProj_00-0004.dll    1    

Error    MSB3073    The command ""C:\Program Files\Epic Games\UE_4.27\Engine\Build\BatchFiles\Build.bat" TestViveProj_00Editor Win64 Development -Project="C:\Users\tech\Perforce\Tower_ViveFocus3_01\Research\Vive\TestViveProj_00\TestViveProj_00.uproject" -WaitMutex -FromMsBuild" exited with code 6.    TestViveProj_00    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets    44    




Does anyone know why this is and how I can fix it?

Edited by EashBala
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...