Opencv – Error in visual studio about exit declaration

opencvopenglvisual-studio-2008

**this error appears each time visual studio 2008 run my code which uses opencv and opengl :

  • 1>c:\program files (x86)\microsoft visual studio
    9.0\vc\include\stdlib.h(371) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs

  • 1> c:\program files (x86)\microsoft visual studio
    9.0\vc\include\gl\glut.h(146) : see declaration of 'exit'

  • 1> c:\program files (x86)\microsoft visual studio
    9.0\vc\include\gl\glut.h(146) : see declaration of 'exit'

how can I solve it?**

Best Answer

Try moving your #include "Glut.h" to the end of your list of includes.

Related Topic