[Linux/Code::Blocks] - How To Setup SDL2 For Building?


We want to use Code::Blocks C++ IDE on our Linux to build our SDL2 game.
Does anyone know how to setup:

  • SDL2
  • SDL2_Image
  • SDL2_Mixer
  • SDL2_TTF

in Linux Code::Blocks C++ IDE?

The above libraries are installed on our Linux and the game builds fine with a makefile.
Let us know, thanks in advance!


Still stuck on the above…
Please look at screenshot below:

Ok, adding:
to Search Directories/Compiler allows the SDL2 app to compile,
but it still won’t link?

What do we put in Search Directories/Linker ?
Let us know, thanks!


Ok, we got it working:

Add to Project built options/Linker settings/Other linker options:

then to Search directories/Compiler: