Undefined symbol : SDL_FreeSurface

483 Views Asked by At

I have this error :

undefined symbol: SDL_FreeSurface

I have tried to call the method void SDL_FreeSurface(SDL_Surface* surface); where I needed to free my surface but this doesn't seems to solve the problem.

I linked the SDL 1.2 with the -lSDL, and -lSDL_image option (/usr/bin/ld: cannot find -lSDL_image).

I use dynamic libraries.

1

There are 1 best solutions below

1
On

I got it :

On Ubuntu, you need to put the -l$(LIB_NAME) at the end of the compilation's line like this :

gcc *.cpp [OPTIONS] -l$(LIB_NAME)