This question is an exact duplicate:
A small program with OpenGL runs only when the project type is Debug, but not Release. Visual Studio Ultimate 2013 environment. I know that you are experienced programmers and you probably know what the trouble is. Thank!
glut32.lib(glut32.dll) : error LNK2026: небезопасный модуль для образа SAFESEH. fatal error LNK1281: Не удается создать образ SAFESEH.