How do I add SDL2 to code blocks?

How do I add SDL2 to code blocks?

Steps to setup SDL in CodeBlocks:

  1. Download SDL library to your computer.
  2. The download file is in Zip format.
  3. Now, copy the SDL.dll file that you have downloaded in Computer > C Drive > Program Files > CodeBlocks > MinGW > bin.
  4. Create a New Folder in C drive named SDL.
  5. Open the Code::Blocks IDE.

How install SDL2 on Windows?

Go to the SDL2 download page and download the latest development library for Windows using MinGW. After extracting the contents using for example 7-Zip, copy the folder “x86_64-w64-mingw32”, to where you want to store the library. Note that this is still the 64-bit version of the library.

How do I run SDL2?

Setting up SDL 2 on Linux

  1. apt-cache search libsdl2. You’ll want to download the development version of SDL 2.
  2. apt-get install libsdl2-dev. 2) If you use the Yellow dog Updater, Modified (used in Fedora and CentOS) you can enter the command:
  3. yum search SDL2-devel.
  4. yum install SDL2-devel.
  5. ./configure.
  6. make all.
  7. make install.

How do I add SDL2 to Visual Studio?

Setting up SDL 2 on Visual Studio 2019 Community

  1. First thing you need to do is download SDL 2 headers and binaries.
  2. Start up Visual Studio and create a new empty C++ project.
  3. Go download the source for lesson 01 and extract the source file.

How do I get SDL2 on Linux?

How do I use SDL with MinGW?

1 Answer

  1. Copy the contents of the lib subfolder to the MinGW lib folder. The MinGW lib folder should be at C:\MinGWStudio\MinGW\lib.
  2. After that, open the include subfolder in the archive and extract the folder named “SDL” to the MinGW include folder, which should be at C:\MinGWStudio\MinGW\include.

How do I install SDL2?

Open up your project and press ALT + F7 to open the properties window. Go to VC++ directories, select include directories, and select edit. Add the path to the “include” folder in your SDL source folder.

How do I get SDL2?

author

Back to Top