So I’ve been playing C:DDA for a couple months, and I thought it was a good idea to mess around with the source code. I spent most of yesterday encountering error after error while trying to get the game to compile (with Code::Blocks, currently); the current one I’m dealing with is:
“obj\Release\src\action.o:action.cpp … undefined reference to ‘strip_positional_formatting(char const*)’”
This looks like it’s defined in translations.h, but if I add an #include to it, the error remains. I’m relatively new to C++, so I don’t know why this wouldn’t work. Does anyone have any idea what I’m doing wrong?
Update: I just noticed the build options.
Release -SDL causes the error mentioned above.
Building Debug works perfectly fine, actually, but I’m trying to make a Tiles build so it doesn’t help me much.
Building Release causes the error ‘undefined reference to libintl_gettext’.
Building with any -Localized option causes the error ‘ld.exe … cannot find -liconv’.
Release or Debug -Tile Support builds the .o files correctly, but finishes with ‘error: 3rdparty\lib[several files]: no such file or directory’
Update again!: Got it working by going into ‘Build options…’, then Debug - Tile Support, then Linker settings. I updated the files there to link to these files in the ‘prepackaged version’ of the libraries on the wiki’s “How to compile” page:
3rdparty\lib\libSDL.dll.a changed to 3rdparty\lib\SDL2.lib
3rdparty\lib\libSDLmain.a changed to 3rdparty\lib\SDL2main.lib
3rdparty\lib\x86\SDL_image.lib changed to 3rdparty\lib\libSDL2_image.dll.a
3rdparty\lib\x86\SDL_ttf.lib changed to 3rdparty\lib\libSDL2_ttf.dll.a
Either the wiki (and/or codeblocks file) needs to be updated to reflect this, or I’m missing a file.