ben@layer
December 22nd, 2008, 07:59 PM
when I ever try to compile a sdl program under sdl I get this
moe@moe-laptop:~$ gcc sdl.c
sdl.c:7: error: expected identifier or ‘(’ before ‘if’
sdl.c:12: warning: data definition has no type or storage class
sdl.c:12: warning: parameter names (without types) in function declaration
sdl.c:17: warning: data definition has no type or storage class
sdl.c:17: error: conflicting types for ‘screen’
sdl.c:3: error: previous declaration of ‘screen’ was here
sdl.c:17: error: ‘scale’ undeclared here (not in a function)
sdl.c:17: error: ‘x’ undeclared here (not in a function)
sdl.c:17: error: ‘y’ undeclared here (not in a function)
sdl.c:17: warning: initialization makes integer from pointer without a cast
sdl.c:17: error: initializer element is not constant
sdl.c:18: error: expected identifier or ‘(’ before ‘if’
sdl.c:29: error: expected identifier or ‘(’ before ‘while’
sdl.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
moe@moe-laptop:~$
heres the sorce file
moe@moe-laptop:~$ gcc sdl.c
sdl.c:7: error: expected identifier or ‘(’ before ‘if’
sdl.c:12: warning: data definition has no type or storage class
sdl.c:12: warning: parameter names (without types) in function declaration
sdl.c:17: warning: data definition has no type or storage class
sdl.c:17: error: conflicting types for ‘screen’
sdl.c:3: error: previous declaration of ‘screen’ was here
sdl.c:17: error: ‘scale’ undeclared here (not in a function)
sdl.c:17: error: ‘x’ undeclared here (not in a function)
sdl.c:17: error: ‘y’ undeclared here (not in a function)
sdl.c:17: warning: initialization makes integer from pointer without a cast
sdl.c:17: error: initializer element is not constant
sdl.c:18: error: expected identifier or ‘(’ before ‘if’
sdl.c:29: error: expected identifier or ‘(’ before ‘while’
sdl.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
moe@moe-laptop:~$
heres the sorce file