im trying to use SDL2 for first time and i compile and there r some error cause of the library
In function `main':
main.cpp:(.text+0x25): undefined reference to `SDL_Init'
main.cpp:(.text+0x31): undefined reference to `SDL_GetError'
main.cpp:(.text+0x80): undefined reference to `SDL_CreateWindow'
main.cpp:(.text+0x90): undefined reference to `SDL_GetError'
main.cpp:(.text+0xc1): undefined reference to `SDL_GetWindowSurface'
main.cpp:(.text+0xe4): undefined reference to `SDL_MapRGB'
main.cpp:(.text+0xf7): undefined reference to `SDL_FillRect'
main.cpp:(.text+0x103): undefined reference to `SDL_UpdateWindowSurface'
main.cpp:(.text+0x10d): undefined reference to `SDL_Delay'
main.cpp:(.text+0x119): undefined reference to `SDL_DestroyWindow'
main.cpp:(.text+0x11e): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
To use the library i write
#include <SDL2/SDL.h>