Yet another problem with compiling (codeblocks)

Using the newbie guide I tried to compile the latest from github I got an error about “gettext”. As outlined here https://github.com/CleverRaven/Cataclysm-DDA/issues/1836 I extracted the archives into my MinGW directory and copied the dlls into the folder that has CataclysmWin.cbp. Now I get a “undefined reference to libintl_gettext” and similar. Being compiling illiterate I can’t figure out what I’m still missing.

Does gettext compile on your system itself? Could be something weird with the windows version of gettext.

Also, just to be clear, the DLLs are runtime libs, they go in the directory with the made .exe.

Headers go in the headers folder, libs in the lib. You can probably also add a directory to one of the Code::Blocks options, where it looks for libs and headers. By default I think it looks in the &PATH&\lib and &PATH&\headers or something environment variables if you have them defined, as well as one directory above the codeblocks file in the lib and headers directories.

Edit: You add the custom directory IF you don’t want to have the files where the default files are. The extra lib and header search directories are for when you want to keep libs and headers out of the default program folders, like if there’s an extension or plugin you can compile in, and you think they won’t be compatible or you may have to update those specific folder later and don’t want to clutter the main program with them.

I’m using “gettext-runtime_0.18.1.1-2_win32.zip” and “gettext-runtime-dev_0.18.1.1-2_win32.zip”; there’s a gettext.exe in the bin folder, so it’s precompiled?
Here is how and where I extracted the files to (folders are being merged):


One file asked to be overwritten or not: libgcc_s_dw2-1.dll but the errors show up either way. Here’s the end of the build log of the latest zip from github, 50 errors up from 14.

obj\Release\computer.o:computer.cpp:(.text+0x18b98): undefined reference to libintl_vsprintf' obj\Release\computer.o:computer.cpp:(.text+0x18d90): undefined reference tolibintl_vsprintf’
obj\Release\computer.o:computer.cpp:(.text+0x18ed2): undefined reference to libintl_vsprintf' obj\Release\computer.o:computer.cpp:(.text+0x18fd8): undefined reference tolibintl_vsprintf’
obj\Release\computer.o:computer.cpp:(.text+0x190ec): undefined reference to libintl_vsprintf' obj\Release\disease.o:disease.cpp:(.text+0x186c4): undefined reference tolibintl_gettext’
obj\Release\disease.o:disease.cpp:(.text+0x18721): undefined reference to libintl_gettext' obj\Release\disease.o:disease.cpp:(.text+0x18754): undefined reference tolibintl_gettext’
obj\Release\disease.o:disease.cpp:(.text+0x1895e): undefined reference to libintl_gettext' obj\Release\disease.o:disease.cpp:(.text+0x1898e): undefined reference tolibintl_gettext’
obj\Release\disease.o:disease.cpp:(.text+0x189b2): more undefined references to libintl_gettext' follow obj\Release\game.o:game.cpp:(.text+0x18949): undefined reference tolibintl_vsprintf’
obj\Release\game.o:game.cpp:(.text+0x18e28): undefined reference to libintl_vsprintf' obj\Release\game.o:game.cpp:(.text+0x1b0e4): undefined reference tolibintl_gettext’
obj\Release\game.o:game.cpp:(.text+0x1b11d): undefined reference to libintl_gettext' obj\Release\game.o:game.cpp:(.text+0x1b156): undefined reference tolibintl_gettext’
obj\Release\game.o:game.cpp:(.text+0x1b18f): undefined reference to libintl_gettext' obj\Release\game.o:game.cpp:(.text+0x1b1c8): undefined reference tolibintl_gettext’
obj\Release\game.o:game.cpp:(.text+0x1b201): more undefined references to libintl_gettext' follow obj\Release\game.o:game.cpp:(.text+0x31de4): undefined reference tolibintl_vsprintf’
obj\Release\game.o:game.cpp:(.text+0x56e17): undefined reference to libintl_snprintf' obj\Release\game.o:game.cpp:(.text+0x5af9b): undefined reference tolibintl_gettext’
obj\Release\inventory_ui.o:inventory_ui.cpp:(.text+0x17adb): undefined reference to libintl_gettext' obj\Release\inventory_ui.o:inventory_ui.cpp:(.text+0x17b14): undefined reference tolibintl_gettext’
obj\Release\inventory_ui.o:inventory_ui.cpp:(.text+0x17b44): undefined reference to libintl_gettext' obj\Release\inventory_ui.o:inventory_ui.cpp:(.text+0x17b80): undefined reference tolibintl_gettext’
obj\Release\inventory_ui.o:inventory_ui.cpp:(.text+0x17bbc): more undefined references to libintl_gettext' follow obj\Release\main.o:main.cpp:(.text.startup+0x70): undefined reference tolibintl_setlocale’
obj\Release\main.o:main.cpp:(.text.startup+0x84): undefined reference to libintl_bindtextdomain' obj\Release\main.o:main.cpp:(.text.startup+0x90): undefined reference tolibintl_textdomain’
obj\Release\main_menu.o:main_menu.cpp:(.text+0x18568): undefined reference to libintl_gettext' obj\Release\main_menu.o:main_menu.cpp:(.text+0x188fe): undefined reference tolibintl_gettext’
obj\Release\main_menu.o:main_menu.cpp:(.text+0x18943): undefined reference to libintl_gettext' obj\Release\main_menu.o:main_menu.cpp:(.text+0x18988): undefined reference tolibintl_gettext’
obj\Release\main_menu.o:main_menu.cpp:(.text+0x189cd): undefined reference to libintl_gettext' obj\Release\main_menu.o:main_menu.cpp:(.text+0x18a12): more undefined references tolibintl_gettext’ follow
obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x18424): undefined reference to libintl_printf' obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x184a4): undefined reference tolibintl_printf’
obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x1b5ba): undefined reference to libintl_printf' obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x1b953): undefined reference tolibintl_printf’
obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x1b9c6): undefined reference to libintl_printf' obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x1b9f3): more undefined references tolibintl_printf’ follow
obj\Release\monster.o:monster.cpp:(.text+0x1a124): undefined reference to libintl_sprintf' obj\Release\npc.o:npc.cpp:(.text+0x1b4b0): undefined reference tolibintl_vsprintf’
obj\Release\overmap.o:overmap.cpp:(.text+0x222ae): undefined reference to libintl_snprintf' obj\Release\overmap.o:overmap.cpp:(.text+0x22504): undefined reference tolibintl_snprintf’
obj\Release\overmap.o:overmap.cpp:(.text+0x225fe): undefined reference to libintl_snprintf' obj\Release\overmap.o:overmap.cpp:(.text+0x27126): undefined reference tolibintl_sprintf’
obj\Release\player.o:player.cpp:(.text+0x1f9b6): undefined reference to libintl_gettext' obj\Release\player.o:player.cpp:(.text+0x1fa29): undefined reference tolibintl_gettext’
Process terminated with status 1 (9 minutes, 3 seconds)
50 errors, 0 warnings (9 minutes, 3 seconds)

Maybe you can try this: http://gnuwin32.sourceforge.net/packages/libintl.htm

I don’t think you should be putting them into the mingw32 folder, they should go into the cataclysm header and lib directories I think.

Try uninstalling codeblocks, removing any spare files, reinstalling, and having the extra files go into cataclysms header/lib directories, or their own directory which is added to the library and header search options under build, project build options, and then the search directories tab under Compiler (for the headers I think) and linker for the libs, and make sure the library is added to the linked libraries, with maybe -lgettexthing, without the .lib part at the end.