Note that there are some explanatory texts on larger screens.

plurals
  1. POGCC/SDL2 Hangs Indefinitely and Stops Responding
    text
    copied!<p>Hi guys Ive been at this issue for a few days now and cant find the answer. <strong>After a successful build of SDL2 my projects hang and dont respond.</strong> They dont accept input and hang indefinitely unless I close them using the command prompt window. Even the 'X' on the application window doesnt respond. As far as I can tell this issue seems to be related to the window itself as the program can draw to the renderer. Please help.</p> <p><strong>I am using Windows 7, MinGW32, Eclipse Europa and SDL2</strong></p> <p>See below for example of the problem....</p> <blockquote> <p>Internal Builder is used for build</p> <p>gcc -O0 -g3 -Wall -c -fmessage-length=0 -osrc\CTestProject.o ..\src\CTestProject.c</p> <p>gcc -oCTestProject.exe src\CTestProject.o -lmingw32 -lSDL2main -lSDL2</p> <p><strong>Build complete</strong> for project CTestProject</p> <p>Time consumed: 562 ms. </p> </blockquote> <p><img src="https://i.stack.imgur.com/JpSLF.png" alt="SDL2 Not Responding"></p> <p>Here is the example program</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;SDL2/SDL.h&gt; int main(int argc, char* args[]) { SDL_Init(SDL_INIT_EVERYTHING); SDL_Event event; SDL_Window* sdlWindow = SDL_CreateWindow("test",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,300,300,SDL_WINDOW_OPENGL); SDL_Renderer* sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); while(event.type != SDL_QUIT){ SDL_RenderClear(sdlRenderer); SDL_SetRenderDrawColor(sdlRenderer, 150, 0, 0, 255); SDL_RenderPresent(sdlRenderer); } SDL_DestroyRenderer(sdlRenderer); SDL_DestroyWindow(sdlWindow); SDL_Quit(); return EXIT_SUCCESS; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload