mskull wrote on Thursday, June 27, 2013:
I’m having this weird issue where the glfwCreateWindow function fails, complaining about how I havn’t initialized GLFW, even though the glfwInit function returns successful just before?
I’m guessing the reason for this might be because I havn’t setup GLFW completely correctly, but if so I’m gonna need some help getting that fixed, as I’m not to experienced in setting up external libraries, especially in Code::Blocks.
Here’s is an outtake from my Base class’s Init function, which is where I’m getting the error
bool Base::Init()
{
glfwSetErrorCallback( error_callback );
if( !glfwInit() ) // <-- this function returns true, yet sends an error to the error_callback function
{
cout << "Failed to initialize GLFW!" << endl;
return false;
}
// Here is my main issue. GLFW sends the same error to the call_back function again
window = glfwCreateWindow( 800, 600, "GLFW Window", glfwGetPrimaryMonitor(), NULL )
if( !window )
{
cout << "Failed to create window!" << endl;
return false;
}
glfwMakeContextCurrent( window );
...
return true;
}
Here’s the error messages from the console
65537 The GLFW library is not initialized
65537 The GLFW library is not initialized
Failed to create window!
Thanks in advance for any help you can give me
mSkull