Misadventures in compiling

After checking both the guide on this subforum (which is now outdated) as well as COMPILING.md in the game’s source code, I’ve made a bit of progress towards building Cataclysm successfully, but I’ve run into a roadblock. After getting all of the LUA and SDL libraries working in Code Blocks, I’ve been unable to compile two of the last libraries needed to build Cataclysm (specifically gettext-0.19.4 and libiconv-1.14), and all attempts to compile said libraries have resulted in failure. As a result of this (or at least, I THINK as a result of this) attempting to build Cataclysm results in things grinding to a halt somewhere around computer.cpp and bionics.cpp

https://puu.sh/rtq0Z/0dad086f55.png

I’d like to know what I’m doing wrong at this point because I can’t figure it out. What IDE do you folks use to develop Cataclysm anyways? Visual Studios?

Compile a minimal example first, don’t try to go for the full build.

Drop features from your build until it compiles.
Or even better: start with just a console release build.
If you’re only using it to test new features not related to tiles, you don’t need anything more.

I’m pretty sure the pure release build compiles just fine under fresh install of CodeBlocks with MinGW. Adding new files can break it.

[quote=“Coolthulhu, post:2, topic:12647”]Compile a minimal example first, don’t try to go for the full build.

Drop features from your build until it compiles.
Or even better: start with just a console release build.
If you’re only using it to test new features not related to tiles, you don’t need anything more.

I’m pretty sure the pure release build compiles just fine under fresh install of CodeBlocks with MinGW. Adding new files can break it.[/quote]

I am compiling with a pure release build though, see above on the screenshot. I’ve also tried using other builds such as LUA, SDL, Localized, and all result in failure to build. I’ve attempted it with no additional libraries, as well as all of the suggested libraries. I’ve attempted it with C++11 interpretation enabled and disabled. I’ve even tried different versions of MinGw. Still no dice.

Using a fresh install of Codeblocks with Mingw results in more progress being made than before, but it still grinds to a halt, this time around actions.cpp

https://puu.sh/ru4wI/0480ca1b7a.png

I should point out that the compiler is capable of building all of the object and lua files, but after that is where it encounters error after error

After checking the compiling.md again I’ve found a bundled bunch of libraries for 64-bit SDL \ Tiles \ Sound \ Lua \ Localization at http://dev.narc.ro/cataclysm/cdda-win64-codeblocks.7z
Any idea how to use this?

Edit: Somehow, through some form of black magic that I still don’t understand, I managed to get Cataclysm to compile successfully now. I’m not even sure what I did to make it work.

[quote=“voskhod, post:3, topic:12647”][quote=“Coolthulhu, post:2, topic:12647”]Compile a minimal example first, don’t try to go for the full build.

Drop features from your build until it compiles.
Or even better: start with just a console release build.
If you’re only using it to test new features not related to tiles, you don’t need anything more.

I’m pretty sure the pure release build compiles just fine under fresh install of CodeBlocks with MinGW. Adding new files can break it.[/quote]

I am compiling with a pure release build though, see above on the screenshot. I’ve also tried using other builds such as LUA, SDL, Localized, and all result in failure to build. I’ve attempted it with no additional libraries, as well as all of the suggested libraries. I’ve attempted it with C++11 interpretation enabled and disabled. I’ve even tried different versions of MinGw. Still no dice.

Using a fresh install of Codeblocks with Mingw results in more progress being made than before, but it still grinds to a halt, this time around actions.cpp

https://puu.sh/ru4wI/0480ca1b7a.png

I should point out that the compiler is capable of building all of the object and lua files, but after that is where it encounters error after error

After checking the compiling.md again I’ve found a bundled bunch of libraries for 64-bit SDL \ Tiles \ Sound \ Lua \ Localization at http://dev.narc.ro/cataclysm/cdda-win64-codeblocks.7z
Any idea how to use this?

Edit: Somehow, through some form of black magic that I still don’t understand, I managed to get Cataclysm to compile successfully now. I’m not even sure what I did to make it work.[/quote]

Hey could you explain how you got even to this stage? I am trying to do the same thing and can’t seem to get anywhere. Thank you.

For me it worked like this:

[ol][li]Get codeblocks, the one with MinGW. Install that somewhere.[/li]
[li]Get DDA code from github[/li]
[li]Start the codeblocks file (the one with .cbp extension)[/li]
[li]Configure codeblocks to use the GCC compiler. Just select it and go with defaults, it doesn’t need specific settings.[/li]
[li]Set the build type to release[/li]
[li]Press build and run button, wait ~30 minutes[/li][/ol]

There was a tiny bit more to that actually, because by the time I did that the code was not working with GCC-4.8 or so (the one codeblocks ships with), but that is what should be working.
If doing that leads to errors during build, that can be an error on our side. Unless you did something above wrong.

[quote=“Coolthulhu, post:5, topic:12647”]For me it worked like this:

[ol][li]Get codeblocks, the one with MinGW. Install that somewhere.[/li]
[li]Get DDA code from github[/li]
[li]Start the codeblocks file (the one with .cbp extension)[/li]
[li]Configure codeblocks to use the GCC compiler. Just select it and go with defaults, it doesn’t need specific settings.[/li]
[li]Set the build type to release[/li]
[li]Press build and run button, wait ~30 minutes[/li][/ol]

There was a tiny bit more to that actually, because by the time I did that the code was not working with GCC-4.8 or so (the one codeblocks ships with), but that is what should be working.
If doing that leads to errors during build, that can be an error on our side. Unless you did something above wrong.[/quote]

I can compile Cataclysm.

I just can’t compile SDL Cataclysm (tiles).

[quote=“Coolthulhu, post:5, topic:12647”]For me it worked like this:

[ol][li]Get codeblocks, the one with MinGW. Install that somewhere.[/li]
[li]Get DDA code from github[/li]
[li]Start the codeblocks file (the one with .cbp extension)[/li]
[li]Configure codeblocks to use the GCC compiler. Just select it and go with defaults, it doesn’t need specific settings.[/li]
[li]Set the build type to release[/li]
[li]Press build and run button, wait ~30 minutes[/li][/ol]

There was a tiny bit more to that actually, because by the time I did that the code was not working with GCC-4.8 or so (the one codeblocks ships with), but that is what should be working.
If doing that leads to errors during build, that can be an error on our side. Unless you did something above wrong.[/quote]
The above works fine, but I’ve been trying to compile with LUA to load one of my modded worlds on an older version, and I get this error when I compile in codeblocks:

Any idea what that’s about?