Using this manual, I tried to get freeglut OpenGL application to compile on my computer. This means I:
- Copied files from freeglut archive to MS program files folder
- Specified
freeglut.lib
in additional dependencies - Set explicitly the freeglut.lib path in libraries folders
But all takes no effect. The C++ header files are found right, but the libraries not - so I get these errors:
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutMainLoop@0 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutSpecialFunc@4 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol "void __cdecl specialKeys(int,int,int)" (?specialKeys@@YAXHHH@Z) referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutDisplayFunc@4 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutInitDisplayMode@4 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutSwapBuffers@0 referenced in function "void __cdecl display(void)" (?display@@YAXXZ)
So my questions:
- Could you guess what may be wrong? (not easy, but I cannot find this out obviously)
- Is there some other manual google didn't find, but better than the one I used?
- Is there some other archive I should download?
My C++ code comes from here. All functions are well found in freeglut header files. Just the libraries are missing.