# MinGW compile problem : undefined reference to \`libintl\_gettext'

**URL:** <https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040>\
**Category:** The Garage\
**Created:** [July 1, 2013, 2:21pm UTC](https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040 "2013-07-01T14:21:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![windfly7](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@windfly7](https://discourse.cataclysmdda.org/u/windfly7)\
**Post date:** [July 1, 2013, 2:21pm UTC](https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040/1 "2013-07-01T14:21:30Z")

</div>

# i download the newest code from github.when compiled with MinGW, i got the error like that : (i checked that mingw has the gettext library, and donot know how to do.)

[sub]

objwin/main\_menu.o: In function `gettext': c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../include/libintl.h:130: undefin ed reference to`libintl\_gettext’  
c:/mingw/bin/…/lib/gcc/mingw32/4.6.2/…/…/…/…/include/libintl.h:130: undefin  
ed reference to `libintl_gettext' c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../include/libintl.h:130: undefin ed reference to`libintl\_gettext’  
c:/mingw/bin/…/lib/gcc/mingw32/4.6.2/…/…/…/…/include/libintl.h:130: undefin  
ed reference to `libintl_gettext' c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../include/libintl.h:130: undefin ed reference to`libintl\_gettext’  
objwin/main\_menu.o:c:/mingw/bin/…/lib/gcc/mingw32/4.6.2/…/…/…/…/include/lib  
intl.h:130: more undefined references to `libintl_gettext' follow objwin/main.o: In function`main’:  
D:\cpp\Cataclysm-DDA-master/main.cpp:38: undefined reference to `libintl_setloca le' objwin/main.o: In function`bindtextdomain’:  
c:/mingw/bin/…/lib/gcc/mingw32/4.6.2/…/…/…/…/include/libintl.h:275: undefin  
ed reference to `libintl_bindtextdomain' objwin/main.o: In function`textdomain’:  
c:/mingw/bin/…/lib/gcc/mingw32/4.6.2/…/…/…/…/include/libintl.h:257: undefin  
ed reference to `libintl\_textdomain’  
collect2: ld returned 1 exit status  
make: \*\*\* [cataclysm.exe] Error 1  
[/sub]

---

<div class="post-metadata">

**Author:** ![Konata](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/konata/32/110_2.png) [@Konata](https://discourse.cataclysmdda.org/u/Konata)\
**Post date:** [July 18, 2013, 6:52am UTC](https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040/2 "2013-07-18T06:52:21Z")

</div>

I found the same problem just minutes ago.  
I can’t solve it too.

---

<div class="post-metadata">

**Author:** ![GalenEvil](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@GalenEvil](https://discourse.cataclysmdda.org/u/GalenEvil)\
**Post date:** [July 18, 2013, 7:21am UTC](https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040/3 "2013-07-18T07:21:25Z")

</div>

the issue is that it can’t find the library itself. It knows the function definitions because you have the libraries added, but is unable to set up the links necessary to access the functions. Copy the runtime .dll library into your cataclysm folder where the Cataclysm executable is going to be made. There are other options, but this should get you up and running with the least messing around with Build options or the Makefile.

---

<div class="post-metadata">

**Author:** ![Konata](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/konata/32/110_2.png) [@Konata](https://discourse.cataclysmdda.org/u/Konata)\
**Post date:** [July 18, 2013, 4:00pm UTC](https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040/4 "2013-07-18T16:00:01Z")

</div>

> [@GalenEvil](#):
>
> the issue is that it can’t find the library itself. It knows the function definitions because you have the libraries added, but is unable to set up the links necessary to access the functions. Copy the runtime .dll library into your cataclysm folder where the Cataclysm executable is going to be made. There are other options, but this should get you up and running with the least messing around with Build options or the Makefile.

I don’t know which of those .dll should I copy.  
It seems that the gettext hadn’t been installed yet.  
Would u please tell me how could I down it and install it?

---

<div class="post-metadata">

**Author:** ![tytyebo](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/tytyebo/32/973_2.png) [@tytyebo](https://discourse.cataclysmdda.org/u/tytyebo)\
**Post date:** [July 18, 2013, 7:52pm UTC](https://discourse.cataclysmdda.org/t/mingw-compile-problem-undefined-reference-to-libintl-gettext/2040/5 "2013-07-18T19:52:24Z")

</div>

Hello, everyone. Sorry for my english.  
I try compile a cataclysm with sdl in mingw in windows and have same errors message.  
I download Developer files.zip [http://gnuwin32.sourceforge.net/packages/libintl.htm](http://gnuwin32.sourceforge.net/packages/libintl.htm) . Extract a folders “lib” and “include” in my MinGW folder. Then set path in Build option -\> Linker Settings -\> Link Libraries in my Code::Blocks to libintl.lib file in MinGW/lib.  
After that erros is gone. I hope I helped you.
