# Problems compiling with MinGW? Perhaps this will help

**URL:** https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231
**Category:** The Garage
**Created:** [May 15, 2013, 10:21am UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231 "2013-05-15T10:21:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Justice](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Justice](https://discourse.cataclysmdda.org/u/Justice)
#### Post date: [May 15, 2013, 10:21am UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231/1 "2013-05-15T10:21:28Z")

</div>

After much time and frustration I’ve learned that the MinGW instructions for compiling Cataclysm-DDA are lacking a few bits of information. Follow these simple instructions:

1. Download the latest Cataclysm-DDA [source code](https://github.com/TheDarklingWolf/Cataclysm-DDA/archive/master.zip).

2. Extract the compressed file to the folder of your choice. Example: C:\github\Cataclysm-DDA

3. Download the latest [MinGW installer](https://sourceforge.net/projects/mingw/files/latest/download?source=files).

4. Run MinGW installer and check the box for C++ Compiler and MinGW Developer ToolKit options. (NOTE: If we fail to install these options, then compiling will fail.)

5. Start the MinGW Shell. Start \ Programs \ MinGW \ MinGW Shell

6. A new window will open. At the prompt, change to the folder containing the source code we extracted in Step 2:

[tt]cd C:\github\Cataclysm-DDA[/tt]

1. Once inside the correct directory run the following commands:

[tt]make clean  
make -f Makefile.Windows[/tt]

NOTE: The compile will take several minutes to complete.

1. Profit!

We can open cataclysm.exe directly from this folder, or we could copy the data folder and cataclysm.exe to another folder of our choice. Example: C:\games\Cataclysm-DDA

---

<div class="post-metadata">

### Author: ![drake1storm](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@drake1storm](https://discourse.cataclysmdda.org/u/drake1storm)
#### Post date: [May 15, 2013, 11:06am UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231/2 "2013-05-15T11:06:18Z")

</div>

You can also replace this with code blocks, open the catalclysmWin project file, and click build-\> compile

---

<div class="post-metadata">

### Author: ![Justice](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Justice](https://discourse.cataclysmdda.org/u/Justice)
#### Post date: [May 16, 2013, 1:08am UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231/3 "2013-05-16T01:08:05Z")

</div>

Thank you, for pointing that out. You could try Visual Studio Express, or use the clunky Cygwin, or just install Linux. This thread is for those that want to use MinGW. For what it’s worth, I tried Code::Blocks several times and received some 36 errors and the compile failed. MinGW has compiled flawlessly. YMMV.

---

<div class="post-metadata">

### Author: ![ejseto](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ejseto](https://discourse.cataclysmdda.org/u/ejseto)
#### Post date: [May 16, 2013, 1:08pm UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231/4 "2013-05-16T13:08:07Z")

</div>

Btw if you’re using the windows makefile, you should comment “OTHERS = -O3” out of the makefile. Level 3 optimizations make compiling take a lot longer.

---

<div class="post-metadata">

### Author: ![Iosyn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/iosyn/32/35_2.png) [@Iosyn](https://discourse.cataclysmdda.org/u/Iosyn)
#### Post date: [May 16, 2013, 1:53pm UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231/5 "2013-05-16T13:53:50Z")

</div>

> [@drake1storm](#):
>
> You can also replace this with code blocks, open the catalclysmWin project file, and click build-\> compile

^ this.

there’s a codeblocks installer that comes with MinGW as standard. Works like a charm for me.

---

<div class="post-metadata">

### Author: ![Justice](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Justice](https://discourse.cataclysmdda.org/u/Justice)
#### Post date: [May 17, 2013, 12:38am UTC](https://discourse.cataclysmdda.org/t/problems-compiling-with-mingw-perhaps-this-will-help/1231/6 "2013-05-17T00:38:52Z")

</div>

> [@ejseto](#):
>
> Btw if you’re using the windows makefile, you should comment “OTHERS = -O3” out of the makefile. Level 3 optimizations make compiling take a lot longer.

Great tip, ejseto! Thanks for mentioning it.

> [@Iosyn](#):
>
> [quote=“drake1storm, post:2, topic:1231”]You can also replace this with code blocks, open the catalclysmWin project file, and click build-\> compile

^ this.

there’s a codeblocks installer that comes with MinGW as standard. Works like a charm for me.[/quote]

GUI vs command line is like Windows vs Linux; Everyone has their own opinion. Besides all that, some people might prefer not to install a 240MB IDE, that they may never use, simply to compile a program with the exact same compiler. C’est la vie. Freedom of choice is a beautiful thing.
