Original Post
The program is a OpenGL 3D game, that is many function call per window loop.
The error only occurs when compiled in debug version which make me think of a compiler setting problem.
The program either crashes telling me that the variable "done" in the main window loop doesn''t exist or there is the following error message:
"
Debug Error!
Program: ... path ...\Program.exe
Module:
File: i386\chkesp.c
Line: 42
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention
"
I tried both calling convention "_cdecl" and "_stdcall" both fails.