Sign in to follow this  
ontheheap

Trouble using SFont and SDL_image

Recommended Posts

I'm getting the following error when compiling my code:
dev@OnTheHeap:~/Code/SDL/Projects/Asteroids$ make
gcc -Wall asteroids.c SFont.o -o asteroids `sdl-config --libs --cflags`
In file included from asteroids.c:22:
asteroids.h:23: error: parse error before '*' token
asteroids.h:23: warning: type defaults to `int' in declaration of `Font'
asteroids.h:23: warning: data definition has no type or storage class
make: *** [asteroids] Error 
This is the section of code it is referring to:

SDL_Surface *background;
SDL_Surface *screen;
SDL_Surface *asteroid_big;
SDL_Surface *asteroid_small;
SDL_Surface *new_game_screen;

SFont_Font *Font;


int end_game_loop = 0;
int player_ships = 3;
int current_level = 1;
int player_won = 0;

Uint8* keys;



When I comment out SFont_Font *Font; it compiles fine. I can't find any parse errors... what am I doing wrong? (If you need more info just ask)

- Stephen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this