Visual Studio and CMake problem - entry point not found

Hello there.
Recently I started having a class in computer graphics, and at the beggining it was required to use CMake and Visual Studio to run a simple test program. However an error message keeps popping up, and not even my professors know how to help me.

The error window says:

Not possible to locate the entry point to the procedure _glutCreateWindowWithExit in the DLL

VisualStudio says in the bottom:

Exception thrown at 0x77D76312 (ntdll.dll) in class1.exe: 0xC0000139: Entry Point Not Found.

Can someone help me find a solution for this problem? Thanks.

My guess is that you’re using original (MJK) GLUT headers with a FreeGLUT DLL.

Try putting:


before the line

#include <GL/glut.h>

(or similar).

Also, check whether you have multiple versions of glut.h and/or glut32.dll installed on the system.