Reputation: 41
get the following error "error: ‘GLFW_FSAA_SAMPLES’ was not declared in this scope". can't figure out the problem
maybe someone can help me with this or give me some hints where to start.
my code:
// Include standard headers
#include <stdio.h>
#include <stdlib.h>
// Include GLEW
#include <GL/glew.h>
// Include GLFW
#define GLFW_INCLUDE_GLU
#include <GLFW/glfw3.h>
// Include GLM
#include <glm/glm.hpp>
using namespace glm;
//GLFWwindow* window;
// Include GLM
#include <glm/glm.hpp>
using namespace glm;
int main( void )
{
// Initialise GLFW
if( !glfwInit() )
{
fprintf( stderr, "Failed to initialize GLFW\n" );
return -1;
}
glfwWindowHint(GLFW_FSAA_SAMPLES, 4); // 4x antialiasing
return 0;
}
getting the following error:
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/dafdadfadf.d"
-MT"src/dafdadfadf.d" -o "src/dafdadfadf.o" "../src/dafdadfadf.cpp"
../src/dafdadfadf.cpp: In function ‘int main()’:
../src/dafdadfadf.cpp:31:17: error: ‘GLFW_FSAA_SAMPLES’ was not declared in this scope
make: * [src/dafdadfadf.o] Error 1
using:
glfw-3.0.4
Nsight Eclipse 5.5.0
Linux ubuntu 12.10
doing:
cmake .
make
sudo make install
i got no errors at all ..
copied the code from here: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/#Opening_a_window
Any hint in any direction?
Upvotes: 2
Views: 3223
Reputation: 52166
GLFW_FSAA_SAMPLES
isn't a valid window hint in GLFW3.
Use GLFW_SAMPLES
instead.
Upvotes: 4