coding:wolf4sdl:setup

Preparing Wolf4SDL for modding

This tutorial, originally posted by dcbasic on the DieHard Wolfers Message Boards, will help you set up your development environment for modding the Wolf4SDL engine.

What you will need

Important Notes:

  • Make sure to install Code::Blocks with the MinGW compiler, or this tutorial will not work. This tutorial assumes you have already installed the programs.
  • Your compiled EXE file will not run without SDL.dll and SDL_Mixer.dll, due to requirements in the engine. Click here to find out where to get them.
  1. If you haven't already, download SDL Devel Win32\MinGW. You will want to download “SDL-devel-1.2.15-mingw32.tar.gz” for Windows.
  2. Extract the zip to it's own folder. Inside that folder, locate the SDL folder (It should be inside /include/)
  3. Open C:\Program Files\CodeBlocks\MinGW\include (Directory may vary depending on where you installed Code::Blocks)
  4. Copy\Move the entire SDL folder from step 2 to the Code::Blocks include folder in step 3.
  5. Open the lib folder that is inside the extracted folder from step 2.
  6. Open C:\Program Files\CodeBlocks\MinGW\lib (Directory may vary depending on where you installed Code::Blocks)
  7. Copy\Move the three files from step 5 to the Code::Blocks lib folder in step 6.
  1. If you haven't already, download SDL Mixer Devel Win32. You will want to download “SDL_mixer-devel-1.2.12-VC.zip” for Windows.
  2. Extract the zip to it's own folder.
  3. Open the include folder that is inside the extracted SDL Mixer folder.
  4. Open C:\Program Files\CodeBlocks\MinGW\include\SDL (Directory may vary depending on where you installed Code::Blocks)
  5. Copy\Move the SDL_mixer.h file from step 3 to the Code::Blocks include folder in step 4.
  6. Open the lib folder that is inside the extracted SDL Mixer folder.
  7. Open C:\Program Files\CodeBlocks\MinGW\lib (Directory may vary depending on where you installed Code::Blocks)
  8. Copy\Move the SDL_mixer.lib file from step 5 to the Code::Blocks lib folder in step 6.
  1. If you haven't already, download the Wolf4SDL Source Code
  2. Extract the Wolf4SDL source code to it's own folder.
  3. Start Code::Blocks if it isn't already open.
  4. Go to File→Open, locate your Wolf4SDL.cbp file and select it.
  5. When it opens, you should see a sidebar with files listed as in the following image (Click to enlarge). Click to enlarge
  6. Go to Projects→Build Options and select the Search directories tab in the window that appears.
  7. Select 'Compiler' from the new group of tabs that have appeared, then select the entry listed in it (It should start with “..\SDL-devel\”). Click on the Edit button.
  8. In the new box that appears, input the directory that holds the SDL include files (C:\Program Files\CodeBlocks\MinGW\include\SDL in this tutorial). Click OK.
    • If you are prompted about making it a “relative path”, the choice is left up to you. If you are planning to move your Code::Blocks installation around, you may want to click Yes.
  9. Select the 'Linker' tab and repeat the previous step, this time inputting the directory with the SDL lib files (C:\Program Files\CodeBlocks\MinGW\lib in this tutorial).
  10. Click OK on the Project build options window to close it and save your changes.

Provided everything above has been done correctly, you should now be able to compile your code! Click on Build→Build to test it! If not, look below.

Remember! To test your EXE file, you will need to put it in the same directory as your game, along with the SDL.dll and SDL_Mixer.dll files. Click here to find out where to get them.

You may encounter an error that contains the following:

cannot find -1SDL
cannot find -1SDL_mixer

First, make sure you have linked your search directories as outlined above, and put the SDL and SDL_Mixer files in their correct places. If that is correct, go to SettingsCompiler and within the window that pops up, click on the Toolchain executables tab.

Your Compiler's installation directory should point to the MinGW folder inside your Code::Blocks installation.

The Program Files tab links Code::Blocks to the compiler for each language, assuming they're in the \bin\ folder of your installation directory. So if your installation directory is like above (C:\Program Files\CodeBlocks\MinGW\) then the folder it assumes is C:\Program Files\CodeBlocks\MinGW\bin\.

If you go to that folder, you will see what your installation has called the files. Make sure they match the file names listed in the Toolchain executables listings, and make any corrections where necessary.

People have reported minor problems with the latest versions of Code::Blocks and Wolf4SDL. You can try installing the 32-Bit version of Code::Blocks, or installing an earlier version. Make sure to get a version bundled with MinGW!

  • coding/wolf4sdl/setup.txt
  • Last modified: 2020/06/11 14:57
  • by zombie