# Yet another problem with compiling (codeblocks)

**URL:** <https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048>\
**Category:** The Garage\
**Created:** [July 1, 2013, 4:34pm UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048 "2013-07-01T16:34:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimQuaid](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jimquaid/32/923_2.png) [@JimQuaid](https://discourse.cataclysmdda.org/u/JimQuaid)\
**Post date:** [July 1, 2013, 4:34pm UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048/1 "2013-07-01T16:34:45Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![pingpong](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@pingpong](https://discourse.cataclysmdda.org/u/pingpong)\
**Post date:** [July 1, 2013, 11:17pm UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048/2 "2013-07-01T23:17:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pingpong](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@pingpong](https://discourse.cataclysmdda.org/u/pingpong)\
**Post date:** [July 1, 2013, 11:20pm UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048/3 "2013-07-01T23:20:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JimQuaid](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jimquaid/32/923_2.png) [@JimQuaid](https://discourse.cataclysmdda.org/u/JimQuaid)\
**Post date:** [July 2, 2013, 2:04am UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048/4 "2013-07-02T02:04:14Z")

</div>

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):

 ![](http://i.imgur.com/pOJavKV.jpg)  
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 to`libintl\_vsprintf’  
obj\Release\computer.o:computer.cpp:(.text+0x18ed2): undefined reference to `libintl_vsprintf' obj\Release\computer.o:computer.cpp:(.text+0x18fd8): undefined reference to`libintl\_vsprintf’  
obj\Release\computer.o:computer.cpp:(.text+0x190ec): undefined reference to `libintl_vsprintf' obj\Release\disease.o:disease.cpp:(.text+0x186c4): undefined reference to`libintl\_gettext’  
obj\Release\disease.o:disease.cpp:(.text+0x18721): undefined reference to `libintl_gettext' obj\Release\disease.o:disease.cpp:(.text+0x18754): undefined reference to`libintl\_gettext’  
obj\Release\disease.o:disease.cpp:(.text+0x1895e): undefined reference to `libintl_gettext' obj\Release\disease.o:disease.cpp:(.text+0x1898e): undefined reference to`libintl\_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 to`libintl\_vsprintf’  
obj\Release\game.o:game.cpp:(.text+0x18e28): undefined reference to `libintl_vsprintf' obj\Release\game.o:game.cpp:(.text+0x1b0e4): undefined reference to`libintl\_gettext’  
obj\Release\game.o:game.cpp:(.text+0x1b11d): undefined reference to `libintl_gettext' obj\Release\game.o:game.cpp:(.text+0x1b156): undefined reference to`libintl\_gettext’  
obj\Release\game.o:game.cpp:(.text+0x1b18f): undefined reference to `libintl_gettext' obj\Release\game.o:game.cpp:(.text+0x1b1c8): undefined reference to`libintl\_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 to`libintl\_vsprintf’  
obj\Release\game.o:game.cpp:(.text+0x56e17): undefined reference to `libintl_snprintf' obj\Release\game.o:game.cpp:(.text+0x5af9b): undefined reference to`libintl\_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 to`libintl\_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 to`libintl\_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 to`libintl\_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 to`libintl\_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 to`libintl\_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 to`libintl\_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 to`libintl\_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 to`libintl\_printf’  
obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x1b5ba): undefined reference to `libintl_printf' obj\Release\mongroupdef.o:mongroupdef.cpp:(.text+0x1b953): undefined reference to`libintl\_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 to`libintl\_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 to`libintl\_vsprintf’  
obj\Release\overmap.o:overmap.cpp:(.text+0x222ae): undefined reference to `libintl_snprintf' obj\Release\overmap.o:overmap.cpp:(.text+0x22504): undefined reference to`libintl\_snprintf’  
obj\Release\overmap.o:overmap.cpp:(.text+0x225fe): undefined reference to `libintl_snprintf' obj\Release\overmap.o:overmap.cpp:(.text+0x27126): undefined reference to`libintl\_sprintf’  
obj\Release\player.o:player.cpp:(.text+0x1f9b6): undefined reference to `libintl_gettext' obj\Release\player.o:player.cpp:(.text+0x1fa29): undefined reference to`libintl\_gettext’  
Process terminated with status 1 (9 minutes, 3 seconds)  
50 errors, 0 warnings (9 minutes, 3 seconds)

---

<div class="post-metadata">

**Author:** ![utunnels](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/utunnels/32/81_2.png) [@utunnels](https://discourse.cataclysmdda.org/u/utunnels)\
**Post date:** [July 2, 2013, 3:12am UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048/5 "2013-07-02T03:12:53Z")

</div>

Maybe you can try this: [http://gnuwin32.sourceforge.net/packages/libintl.htm](http://gnuwin32.sourceforge.net/packages/libintl.htm)

---

<div class="post-metadata">

**Author:** ![pingpong](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@pingpong](https://discourse.cataclysmdda.org/u/pingpong)\
**Post date:** [July 2, 2013, 3:14am UTC](https://discourse.cataclysmdda.org/t/yet-another-problem-with-compiling-codeblocks/2048/6 "2013-07-02T03:14:38Z")

</div>

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.
