All pastes #81316 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-07 10:50 UTC
rendered paste body
#include "SDL/SDL.h"
#include <stdio.h>

int sdlinit(){
    printf("Initialzing SDL\n");
    SDL_Init ( SDL_INIT_VIDEO | SDL_INIT_TIMER );
    if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER)==-1)) {
    printf("Could not initialize SDL: %s.\n", SDL_GetError());
    }
    return 0;
}

int main(){
    sdlinit();
    printf("Everything is A-OK. Test over\n");
    SDL_Quit;    
    return 0;
}


makefile

all: test

test: test.o
    gcc 'sdl-config --libs' test.o -o test

test.o: test.c
    gcc -c 'sdl-config --cflags' test.c