Skip to main content
New Participant
January 5, 2016

OVR methods being undefined?

I've opened up the OculusRoomTiny(GL) project and used the code to get a base going. I've included GLFW and GLEW and only having certain errors. I feel as if I've missed some libs but I've checked everything! (I'm using Visual studio 2015)


What I have:

In VC++ Directories - I've included OVR + GLFW + GLEW folder for include directories
in Library Directories - I've included lib files in OVR and GLFW + GLEW
in the linker I've included the additional dependencies:
glfw3.lib
opengl32.lib
glew32.lib
LibOVR.lib
liboverd.lib
LibOVRKernel.lib

I've added all the required includes at the top of my main.cpp

//OpenGL
#include <GL\glew.h>
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>

//Oculus
#include <OVR.h>
#include <OVR_CAPI.h>
#include <OVR_CAPI_GL.h>
#include <Kernel\OVR_Types.h>
#include <OVR_CAPI_0_8_0.h>
#include <OVR_Kernel.h>


I've been getting the following errors:



Error (active) identifier "ovrHmd_Create" is undefined 535
Error (active) identifier "ovrHmd_CreateDebug" is undefined 537



code:


if (!(hmd = ovrHmd_Create(0)))
{
fprintf(stderr, "failed to open Oculus HMD, falling back to virtual debug HMD\n");
if (!(hmd = ovrHmd_CreateDebug(ovrHmd_DK2)))
{
fprintf(stderr, "failed to create virtual debug HMD\n");
return -1;
}
}

    3 replies

    Inspiring
    January 5, 2016
    I responded in the other thread you made. I think you just need a using directive after the includes.

    using namespace OVR;
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Inspiring
    January 5, 2016
    If you're using the 0.8 API, you need to update your code. ovrHmd_Create has been replaced by ovr_Create and ovrHmd_CreateDebug has been removed. It sounds like you based your code on the OculusRoomTiny from a previous version of the SDK.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Inspiring
    January 5, 2016
    So obvious. I need more sleep. Nice catch.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV