Cause:
The stdlib.h which ships with the recent versions of Visual Studio has a different (and conflicting) definition of the exit() function. It clashes with the definition in glut.h.
Solution:
Override the definition in glut.h with that in stdlib.h. Place the stdlib.h line above the glut.h line in your code.
#include <stdlib.h>
#include <GL/glut.h>
Related Contents:
- How to use GLUT/OpenGL to render to a file?
- How do you install GLUT and OpenGL in Visual Studio 2012?
- Using the mouse scrollwheel in GLUT
- How do I compose a rotation matrix with human readable angles from scratch?
- Rendering meshes with multiple indices
- Should I ever use a `vec3` inside of a uniform buffer or shader storage buffer object?
- About OpenGL texture coordinates
- How to render depth linearly in modern OpenGL with gl_FragCoord.z in fragment shader?
- OpenGL 3D-raypicking with high poly meshes
- how should i handle (morphing) 4D objects in opengl? [closed]
- Why transform normals with the transpose of the inverse of the modelview matrix?
- glVertexAttribPointer and glVertexAttribFormat: What’s the difference?
- How does OpenGL work at the lowest level? [closed]
- How to compile for Windows on Linux with gcc/g++?
- How to implement 2D raycasting light effect in GLSL
- Rotating a Group of Vectors
- What are the Attribute locations for fixed function pipeline in OpenGL 4.0++ core profile?
- GLSL fixed function fragment program replacement
- What does “immediate mode” mean in OpenGL?
- What is the proper way to modify OpenGL vertex buffer?
- Matrix inverse accuracy
- Is OpenGL coordinate system left-handed or right-handed?
- Passing a list of values to fragment shader
- Do conditional statements slow down shaders?
- OpenGL translation before and after a rotation
- The purpose of Model View Projection Matrix
- Getting the true z value from the depth buffer
- Interpolating between rotation matrices
- How to use Pivot Point in Transformations
- Render OpenGL scene to texture using FBO in fixed function pipeline drawing
- In a fragment shader, why can’t I use a flat input integer to index a uniform array of sampler2D?
- OpenGL – Mouse coordinates to Space coordinates
- OpenGL 2 Texture Internal Formats GL_RGB8I, GL_RGB32UI, etc
- What is state-of-the-art for text rendering in OpenGL as of version 4.1? [closed]
- How to load a bmp on GLUT to use it as a texture?
- OpenGL VAO best practices
- Why does GL divide `gl_Position` by W for you rather than letting you do it yourself?
- How do I draw text with GLUT / OpenGL in C++?
- Using GLEW to use OpenGL extensions under Windows
- how to enable vertical sync in opengl?
- Reflection and refraction impossible without recursive ray tracing?
- How to make an OpenGL rendering context with transparent background?
- Normal mapping gone horribly wrong
- OpenGL Line Width
- Multithreaded Rendering on OpenGL
- Overlaying on a 3D fullscreen application
- How to draw text using only OpenGL methods?
- Concave GL_POLYGON doesn’t color in?
- When I run the .jar, I get a “No lwjgl in java.library.path” error
- Why is my OBJ parser rendering meshes like this?