Forum Discussion
jaholtz
11 years agoHonored Guest
Oculus library linking question...
So I'm trying to setup an incredibly simple oculus application for test purposes that just gets the orientation from the oculus and prints it to standard out (it's a terminal c++ application). I ha...
jaholtz
11 years agoHonored Guest
I've tried building this with both visual studio and and g++. I'll link my error messages here, they're basically the same both places though. Other potential problems, do I need to build/rebuild and make the oculus library (windows version) before I link it into my program? The weirdest thing is that visual studio finds and recognizes the header file because I don't get any errors before build on the methods not being recognized. It's only when I go to build (and linking happens) that I get errors. I feel like I must be missing something small but I don't know what it is.
g++ errors
visual studio errors
g++ errors
g++ -IOculusSDK/LibOVR/Include -LOculusSDK/LibOVR/Lib/x64/VS2013/ -llibovr64 oculusTest.cc
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x14): undefined reference to `ovr_Initialize'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x14): relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`ovr_Initialize'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x1e): undefined reference to `ovrHmd_Create'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x1e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`ovrHmd_Create'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x3f): undefined reference to `ovrHmd_ConfigureTracking'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x3f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`ovrHmd_ConfigureTracking'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x68): undefined reference to `ovrHmd_BeginFrameTiming'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x68): relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`ovrHmd_BeginFrameTiming'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x6d): undefined reference to `ovr_GetTimeInSeconds'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x6d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`ovr_GetTimeInSeconds'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x8f): undefined reference to `ovrHmd_GetTrackingState'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x8f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`ovrHmd_GetTrackingState'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x13d): undefined reference to `ovrHmd_EndFrameTiming'
/tmp/ccogrJXU.o:oculusTest.cc:(.text+0x13d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `ovrHmd_EndFrameTiming'
visual studio errors
Error 1 error LNK2019: unresolved external symbol _ovr_Initialize referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 2 error LNK2019: unresolved external symbol _ovrHmd_Create referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 3 error LNK2019: unresolved external symbol _ovrHmd_ConfigureTracking referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 4 error LNK2019: unresolved external symbol _ovrHmd_GetTrackingState referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 5 error LNK2019: unresolved external symbol _ovrHmd_BeginFrameTiming referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 6 error LNK2019: unresolved external symbol _ovrHmd_EndFrameTiming referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 7 error LNK2019: unresolved external symbol _ovr_GetTimeInSeconds referenced in function "void __cdecl Initialization(void)" (?Initialization@@YAXXZ) C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Project1\Source.obj Project1
Error 8 error LNK1120: 7 unresolved externals C:\Users\Silvermourn\Documents\Visual Studio 2013\Projects\Project1\Debug\Project1.exe 1 1 Project1
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 29 days ago
- 7 months ago