Problem with SDL_gfx

I am just new to SDL. I'm trying to create a line on the screen. I keep getting an error message saying "undefined reference to 'lineRGBA'". Here's my code:

#include "SDL.h"
#include "SDL_gfxPrimitives.h"

const int WINDOW_WIDTH = 640;
const int WINDOW_HEIGHT = 480;

int main(int argc, char **argv)
{
SDL_Init( SDL_INIT_VIDEO );

SDL_Surface* screen = SDL_SetVideoMode( WINDOW_WIDTH, WINDOW_HEIGHT, 0,
SDL_HWSURFACE | SDL_DOUBLEBUF );

SDL_Event event;
bool gameRunning = true;

while (gameRunning)
{
if (SDL_PollEvent(&event))
{
if (event.type == SDL_QUIT)
{
gameRunning = false;
}
}

SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 0, 0, 0));

lineRGBA(screen,
20, 10,
70, 90,
255, 0, 0, 255);

SDL_Flip(screen);
}

SDL_Quit();

return 0;
}
Topic archived. No new replies allowed.