Greetings !!
I already dig the internet but failed to find a solution concerning this simple program expected to initialize the glut context…
#include <stdio.h>
#include <stdlib.h>
// Librairie opengl
#include <GL/gl.h>
#include <GL/glut.h>
int windowID;
int main(int argc,char* argv[],char *envp[])
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(1024,768);
windowID = glutCreateWindow("Not utf8 -- première fenêtre en opengl !!");
glutFullScreen();
exit(0);
}
When debugging, I can see the window opened (that how I can say that the window title does not handle the utf8).
When executing, nothing happened and I got a segmentation fault happening at line 33 (that points to the glutInit() call).
When debugging the SIGSEGV (segmentation fault) signal is sent when program is exiting… all the main functions seem to be executed without any problem.
I know that argc is modified as glutInit extracts any command line options intended for the GLUT library.
I have nothing to pass, for now, to the application, so argc must be 1 and argv to NULL.
What is wrong ? Did I forgot something ?