Reputation: 21
I´m trying to use the filledCircleRGBA function from the _gfxPrimitive lib from SDL2, but it says 'fatal error:SDL2_gfxPrimitives.h: No such file or directory
I have both includes and I use -lSDL2 and -lSDL2_gfx on the command line
#include <SDL.h>
#include <SDL2_gfxPrimitives.h>
int main() {
SDL_Window* g_pWindow = NULL;
filledCircleRGBA(g_pWindow, 2, 4, 4, 255, 255, 255, 255);
return 0;
}
Why can´t I use _gfxPrimitives functionalities? I have the -dev SDL2 installed, so it should have all the libs
Upvotes: 0
Views: 2034
Reputation: 143
Installed with SDL2 is sdl2-config
, a program which you run with parameter --cflags
or --libs
. Pass the output of using either parameter to your compiler and linker, respectively. --cflags
is particularly what you need, as it instructs the compiler to add the SDL2 include directory to your compiler's search path.
Upvotes: 0