Why does this code:
/* gcc test.c -o test -lSDL2 -Wall -Wextra */
#include <SDL2/SDL.h>
void close() {
printf("HERE\n");
SDL_Quit();
}
int main() {
SDL_Init(SDL_INIT_VIDEO);
return 0;
}
…cause a segfault after printing multiple times "HERE"? Is the close function defined in sdl and called during the init?
I compiled it on archlinux, if i remove the close function or rename it works fine.
You need to sign in to view this answers
Leave feedback about this