# Need help building on win 7

**URL:** https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927
**Category:** The Lab
**Created:** [April 22, 2014, 6:25pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927 "2014-04-22T18:25:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Euphe](https://avatars.discourse-cdn.com/v4/letter/e/ac91a4/32.png) [@Euphe](https://discourse.cataclysmdda.org/u/Euphe)
#### Post date: [April 22, 2014, 6:25pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/1 "2014-04-22T18:25:20Z")

</div>

Long story short: I want to make a mod. I am trying to build the project using codeblocks (standard config), but I get this error:

```auto

```

in computer.cpp

I was told that it’s a problem people encountered before.  
Do I need to install some dependencies?

---

<div class="post-metadata">

### Author: ![elauminx](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/elauminx/32/283_2.png) [@elauminx](https://discourse.cataclysmdda.org/u/elauminx)
#### Post date: [April 22, 2014, 9:27pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/2 "2014-04-22T21:27:45Z")

</div>

[quote=“Euphe, post:1, topic:5927”]I was told that it’s a problem people encountered before.  
Do I need to install some dependencies?[/quote]

No.  
As a quick workaround change (ssize\_t) to (int).  
And do the same for other possible occurrences of the same error…

Some dev who uses windos and codeblocks should really work out a permanent solution to this:  
src/platform.h doesn’t look too convincing…

but i’m on linux and can only give this quick hack,  
eai

---

<div class="post-metadata">

### Author: ![Euphe](https://avatars.discourse-cdn.com/v4/letter/e/ac91a4/32.png) [@Euphe](https://discourse.cataclysmdda.org/u/Euphe)
#### Post date: [April 23, 2014, 8:51am UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/3 "2014-04-23T08:51:12Z")

</div>

[quote=“elauminx, post:2, topic:5927”][quote=“Euphe, post:1, topic:5927”]I was told that it’s a problem people encountered before.  
Do I need to install some dependencies?[/quote]

No.  
As a quick workaround change (ssize\_t) to (int).  
And do the same for other possible occurrences of the same error…

Some dev who uses windos and codeblocks should really work out a permanent solution to this:  
src/platform.h doesn’t look too convincing…

but i’m on linux and can only give this quick hack,  
eai[/quote]

Thanks, that worked. Now I get this error:

[code]||=== Cataclysm, Debug ===|

D:\c\Cataclysm-DDA\src\npc.cpp|1301|error: ‘M\_PI’ was not declared in this scope|

[/code]

---

<div class="post-metadata">

### Author: ![elauminx](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/elauminx/32/283_2.png) [@elauminx](https://discourse.cataclysmdda.org/u/elauminx)
#### Post date: [April 23, 2014, 11:11am UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/4 "2014-04-23T11:11:22Z")

</div>

[quote=“Euphe, post:3, topic:5927”]Thanks, that worked. Now I get this error:

[code]||=== Cataclysm, Debug ===|

D:\c\Cataclysm-DDA\src\npc.cpp|1301|error: ‘M\_PI’ was not declared in this scope|

[/code][/quote]

Ah… that’s prolly math.h/cmath “fuckup”…  
You could prolly fix it by adding:

```auto
#include <cmath>
```

after #include .

But that’s also only a hack. Which may not even work at all, as the one too many prollies atest to my being on Linux and not being able to play with/fix your setup.

If you haven’t already, looking at [compile](http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile) wiki page (i.e. using MinGW not CB/VS) might be of better use, since, as it goes, we might get it to compile, but linking stage is all the more “fuckyapped”…

And if you “only” want to mod, why not just get the experimental build. I see the main C:DDA page has updated itself to proper info.

screams away running in lolgrief,  
eai

---

<div class="post-metadata">

### Author: ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)
#### Post date: [April 24, 2014, 2:34pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/5 "2014-04-24T14:34:33Z")

</div>

I’m starting to wonder whether it might not be easier to provide a linux virtual disk image with mingw-w64 set up for cross-compiling CDDA…

---

<div class="post-metadata">

### Author: ![Karols146](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@Karols146](https://discourse.cataclysmdda.org/u/Karols146)
#### Post date: [April 24, 2014, 10:13pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/6 "2014-04-24T22:13:55Z")

</div>

Or use just Cygwin 64.

---

<div class="post-metadata">

### Author: ![CIB](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/cib/32/903_2.png) [@CIB](https://discourse.cataclysmdda.org/u/CIB)
#### Post date: [April 25, 2014, 12:24pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/7 "2014-04-25T12:24:04Z")

</div>

Unless cygwin has done a lot to improve their installation process, setting up virtualbox and a disk image is actually less effort. ~\_~ Also I’m not sure mxe runs on cygwin.

---

<div class="post-metadata">

### Author: ![Karols146](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@Karols146](https://discourse.cataclysmdda.org/u/Karols146)
#### Post date: [April 25, 2014, 8:18pm UTC](https://discourse.cataclysmdda.org/t/need-help-building-on-win-7/5927/8 "2014-04-25T20:18:03Z")

</div>

When i try compile DDA, I don’t see your disk image so i try do it other way. I don’t check your disk image, and maybe it take less effort. I just told him how to do it.
