Reputation:
I downloaded the SDL_gfx
and did all the stuff (./configure
, make install
, ...), and even the make checks, but when I'm trying to use the actual function in a source code, it says :
undefined reference to pixelColor.
I included <SDL/SDL_gfxPrimitives.h>
, and inside the .h
file, there is
int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32)
Do I have to use a special compilation flag for the SDL_gfx
?
For now I use -lSDL -lSDL_ttf
Upvotes: 1
Views: 925
Reputation: 52083
For now I use
-lSDL -lSDL_ttf
Link against SDL_gfx too: -lSDL_gfx
You should probably use pkg-config
though:
`pkg-config sdl SDL_ttf SDL_gfx --libs`
That'll spit out everything you need, library-wise:
-lSDL_ttf -lSDL_gfx -lSDL
Upvotes: 1