#include<glglut.h> void Draw() { } void Initialize() { } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(400, 400); glutInitWindowPosition(100, 200); glutCreateWindow("gg"); glutDisplayFunc(Draw); Initialize(); glutMainLoop(); return 0; } 

Errors are issued

1>ррпо.obj : error LNK2019: ссылка на неразрешенный внешний символ __imp____glutInitWithExit@12 в функции _glutInit_ATEXIT_HACK@8 1>ррпо.obj : error LNK2019: ссылка на неразрешенный внешний символ __imp____glutCreateWindowWithExit@8 в функции _glutCreateWindow_ATEXIT_HACK@4 error LNK1120: 2 неразрешенных внешних элемента

All libraries for working with OpenGL are connected.

  • You have a slash in the wrong direction gl/glut - Vladimir Gordeev

1 answer 1

Need to add.

 #include <windows.h> #include <gl\gl.h> 

Russified error messages are an absolute evil, they were translated by people who do not know how the compiler works . Unresolved external symbol google.

You can still try:

 #pragma comment (lib, "opengl32.lib") #pragma comment (lib, "glu32.lib") #pragma comment(lib,"glut32.lib") 
  • in no case does not work, the same oibki remain - LLIAKAJI
  • Another shamanic directive. Try hard to debug blindly. #define GLUT_DISABLE_ATEXIT_HACK - igumnov
  • it helped, only to the surprise of a mistake the launch is impossible because glut32.dll is missing I did everything on liveinternet.ru/users/oectacann/post153937570 - LLIAKAJI
  • Link to GLUT user.xmission.com/~nate/glut.html - igumnov
  • This is incorrect glut.h and glaux.h copy to:: \\ include \ GL (for example, I have c: \ Program Files \ Microsoft SDKs \ Windows \ v7.0A \ include \ gl) *) glut.lib glut32.lib glaux .lib copy to:: \\ lib Looking for folders: \ Visual Studio 2012 \ VC \ include \ Visual Studio 2012 \ VC \ lib But then you can build the project only on your computer. [See this thread] [1] [1]: hashcode.ru/questions/147227 [1]: http: // - igumnov