undeclared identifiers, glfw3.h, 32 bit Windows, VS 2010

Using GLFW
2013-07-19
2013-07-20
  • WaywardSquanderer

    Trying to work around my CMake problems, I downloaded the 32bit binaries. I copied the .dll into my System32 folder, the .lib files into my Microsoft SDKs/lib folder and the glfw3.h file into the Microsoft SDKs/include folder.

    I get the following errors:

    j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(14): error C2065: 'GLFW_OPENGL_VERSION_MAJOR' : undeclared identifier
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(14): error C3861: 'glfwOpenWindowHint': identifier not found
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(15): error C2065: 'GLFW_OPENGL_VERSION_MINOR' : undeclared identifier
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(15): error C3861: 'glfwOpenWindowHint': identifier not found
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(16): error C3861: 'glfwOpenWindowHint': identifier not found
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(17): error C3861: 'glfwOpenWindowHint': identifier not found
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(20): error C2065: 'GLFW_WINDOW' : undeclared identifier
    1>j:\users\Bojangles\documents\visual studio 2010\projects\opengl4test\opengl4test\main.cpp(20): error C3861: 'glfwOpenWindow': identifier not found

    When I try to run this program from an OpenGL 4 tutorial:
    http://antongerdelan.net/opengl/hellotriangle.html

     
  • WaywardSquanderer

    Got an answer on another forum. The problem here is that the tutorial code is using an older version of GLFW, so some of the function and variable parameters are not in the glfw3.h header file. I went through the tutorial code and changed the identifiers to their updated names (and updated function signatures!), and all is good now.

    Man, that was frustrating because I thought it was a project setting that I had screwed up.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks