You need to follow instructions in this quote:
[quote=“Robik, post:6, topic:7240”]To make SDL to compile on Windows 7 x64 with Code::Blocks I did following steps:
- I used Release - SDL configuration - all changes in Project Build Options should be done for specific configuration, not for entire project!
- added missing SDLTILES into Project Build Options->Compiler settings->#defines (other tiles configurations had it already)
- created WinDepend directory in project root (it is defined in .gitignore already)
- copied these files:
[ul][li]content of SDL2-devel-2.0.3-VC.zip\SDL2-2.0.3\lib\x86 into WinDepend[/li]
[li]content of SDL2-devel-2.0.3-VC.zip\SDL2-2.0.3\include into WinDepend\SDL2[/li]
[li]content of SDL2_ttf-devel-2.0.12-VC.zip\SDL2_ttf-2.0.12\lib\x86 into WinDepend[/li]
[li]content of SDL2_ttf-devel-2.0.12-VC.zip\SDL2_ttf-2.0.12\include into WinDepend\SDL2[/li]
[li]content of SDL2_image-devel-2.0.0-VC.zip\SDL2_image-2.0.0\lib\x86 into WinDepend[/li]
[li]content of SDL2_image-devel-2.0.0-VC.zip\SDL2_image-2.0.0\include into WinDepend\SDL2[/li][/ul]
- replaced paths in Project Build Options->Search directories with path WinDepend
- replaced paths in Project Build Options->Linker settings with these:
- last missing piece for successful compilation was
Second step, go into the directory you downloaded the git of catadda to, go into the src directory and edit sdltiles.cpp
On line 32 (after #include ), you need to insert a new line and add #include
, then, two lines down from that, change "#define strcasecmp strcmpi" to #define strcasecmp StrCmpI"
So thanks for that! :)
Now, the only problem is that change to strtiles.cpp in in git hub as Uncommited change…[/quote]
I’m gonna break it down for a “real noob” level
Before you start you need to checkout the code from the repository, for instance using GitHub’s handy app, or maybe by just downloading it from the site here: GitHub - CleverRaven/Cataclysm-DDA: Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world. (big friendly “download ZIP” button)
You’re also going to need Code::Blocks, obviously. Get it here: https://www.codeblocks.org/downloads/binaries/ , make sure to get the version with the included mingw compiler.
Open the project file in the directory where you’ve downloaded the source to.
For steps 1 and 2 of the above process, open Project->Build Options… from the CB menu strip. In the window, pick “Release - SDL” on the left side, and the “Compiler Settings”->“#defines” tabs on the right side. Add “SDLTILES”, on a new line and without quotes, to the list of strings you see there.
Step 3 should probably not be explained additionally, just create a folder called “WinDepend” in the same directory as the Cataclysm project file. In preparation for step 4, also create an “SDL2” folder inside the “WinDepend” folder.
Files for step 4 are here:
SDL2-devel-2.0.3-VC.zip - https://www.libsdl.org/download-2.0.php (under Development Libraries, for 32-bit Windows)
SDL2_ttf-devel-2.0.12-VC.zip - https://www.libsdl.org/projects/SDL_ttf/ (under Development Libraries)
SDL2_image-devel-2.0.0-VC.zip - https://www.libsdl.org/projects/SDL_image/ (under Development Libraries)
From within each of those archives, any files under the \lib\x86 path are to be extracted directly into the WinDepend folder.
Any files under the \include folder must be extracted to the WinDepend\SDL2 folder.
Additionally, as I noted above, you will need a replacement SDL_platform.h file from here: https://hg.libsdl.org/SDL/raw-file/e217ed463f25/include/SDL_platform.h . Download it and put it in the WinDepend\SDL2 folder after you’re done with the others.
For step 5, open the same Project->Build Options… window as in step 2, and select the same “Release - SDL” entry on the left. On the right, select the “Search Directories” tab. It has three sub-tabs, you need to check two - “Compiler” and “Linker”. Inside each, there should be only one remaining entry, and it should read simply “WinDepend” - create it, and delete all others.
For step 6, in the same window and with “Release - SDL” still selected on the left, select the “Linker Settings” tab on the right. You should see a list of several paths there. Either edit them all, or delete them after adding the new entries, but in the end there should be four entries in that list, reading “WinDepend\SDL2.lib”, “WinDepend\SDL2_image.lib”, “WinDepend\SDL2_ttf.lib”, and “WinDepend\SDL2main.lib”, all without quotes.
For step 7, you’ll need to open one of the source files. With the Cataclysm project open, you’ll see on the left a list showing the files in the Cataclysm project. If you don’t, hit Shift+F2, or check the View->Manager option from the menu strip. The file you need is under Cataclysm\Sources\src\sdltiles.cpp . Open that file, and scroll down to lines 32-35, which should be saying
#define strcasecmp strcmpi
(unless you checkout the code after it’s been fixed)
You need to make that section look like this instead, expanding it to four lines:
#define strcasecmp StrCmpI
Note the capitalization on the last line. After that, you are pretty much done. Make sure you select the “Release - SDL” profile on the drop-down next to the compile buttons on the main screen (top center of the Code::Blocks window, right under the menu strip), otherwise all the variables you’ve been setting won’t apply.
If you still have problems after doing all that, post the exact error messages you’re getting here, and we’ll try to sort it out.