Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //main.c
- #define SDL_MAIN_HANDLED
- #include <SDL2/SDL.h>
- extern int printf(const char* fmt,...);
- int main(int argc, char** argv){
- if(SDL_Init(SDL_INIT_VIDEO)){
- printf("SDL failed to initialize: \"%s\"\n",SDL_GetError());
- return 1;
- };
- //(occurs only if init above succeeds)
- SDL_Window* window=SDL_CreateWindow("Hello World!",
- SDL_WINDOWPOS_CENTERED,
- SDL_WINDOWPOS_CENTERED,
- 640,480, 0);
- SDL_Delay(1000);
- if(window != NULL) SDL_DestroyWindow(window);
- SDL_Quit();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement