Technical support > Windows
Building 2.5-dev with Code::Blocks and SDL 2
(1/1)
Ragwortshire:
I'm having trouble building the current development version using Code::Blocks 12.11 on Windows 7, with an Intel Core i3 M350 processor. I don't have much experience with Code::Blocks, so it's possible I'm missing something very obvious, but here goes.
So far I've only tried to build ufo.exe. I eventually got the compiling and linking to go through, and got all the necessary .dll files, and so can successfully start the game. I can get to the main menu without problems. When I load a saved game, the geoscape briefly shows up before the program abruptly crashes.
I've attached my console log. Any idea what the problem could be, or what I should try to fix it?
UPDATE: When using SDL 1, this problem did not occur - thankfully! However I haven't tested the build thoroughly yet.
UPDATE: After rebuilding game.cbp, the battlescape now seems to work and I can do various base functions. Anything else that it's usually a good idea to test?
Mattn:
Cool, please share the mingw package you used to build it with sdl2.
in general the battlescape is the main thing to test. if you got there via the ui and a map is loaded, most stuff should work fine.
regarding sdl2 especially the input should get tested.
Ragwortshire:
Here is what I did, to the best of my memory:
- Installed Code::Blocks 12.11.
- In the Code::Blocks settings, set it to use mingw32 which I had installed previously. For some reason I can't find my mingw32 version, but my msys version is 1.0.
- Downloaded the Code::Blocks package from the wiki (http://ufoai.org/wiki/Code::Blocks)
- Opened the ufo.cbp project.
- In Settings -> Compiler -> Search Directories, added MinGW\include, codeblocks\MinGW\include (from the wiki package) for the compiler and MinGW\lib, codeblocks\MinGW\lib for the linker.
- In the linker settings, added -static-libgcc -static-libstdc++
- Copied the dlls from the Code::Blocks package into MinGW\bin.
When I was trying to use SDL 2, I also did the following:
- Added the paths for the SDL 2 headers to Compiler -> Search Directories for the compiler, and for the .a files to the linker.
- Added -lSDL2main -lSDL2 -lSDL2_mixer -lSDL2_ttf to the linker settings.
- Copied the SDL 2 dlls to MinGW\bin.
Navigation
[0] Message Index
Go to full version