Newby Guide to Compiling (and Editing) With Code::Blocks

Hmm. Where are I appending the path info to? A setting in Code::Blocks I assume?

Nope, it’s a windows system variable. This page should walk you through it much better than I can: https://www.java.com/en/download/help/path.xml

I’m running into a similar problem as Random_dragon. I made sure that there was a proper gitpath and everything. I’m kinda at a loss.

Running project pre-build steps
cmd /c git --version || echo 'git' command not found!
git version 2.7.2.windows.1
cmd /c for /F "tokens=*" %i in ('git describe --tags --always --dirty') do echo #define VERSION "%i" >  src/version.h
fatal: Not a git repository (or any of the parent directories): .git
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I eventually got it working. For what little good it’s doing now.

I can’t get any of this to work at all, Still getting the ‘git’ errors.

I don’t feel like installing linux just to compile cataclysm today.

Is there an up to date guide for codeblocks anywhere?

I have attempted the updated guide on the wiki

http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile#Updated_guide_.28incomplete_but_results_in_working_executable.29

I’m getting the same error regarding ‘git’

Removing the offending git thingy seems to have worked.
http://smf.cataclysmdda.com/index.php?topic=11414.0

I can only compile the non SDL, no lua, No localisation though. Deps are too hard to find due to scatterbrained documentation.

Just a spot saver post. Keeping track of things, and hopefully finding this thread again latter. Than you for your patience. Ill be going now.
[move]Don’t mind me just passing through…[/move]

I got it running easily enough. Some files are missing from the codeblocks project file (and had to do the ‘remove the git call’ editing). And I have only been trying the console version so far. But it seems to work a lot better than before.

Didn’t even need to download mingw, as the newest version of codeblocks seemed to work.

Here is my guide:

  • Install codeblocks ( codeblocks-16.01mingw-setup.exe )
  • Download the most recent github CDDA code. (I lied, I didn’t do this, I already have git running, and copied my own clone of CDDA, but that is a bit more advanced).
  • Unpack the github code in a project directory somewhere. (Not in the same directory as codeblocks (codeblocks is the tool, that works on your ‘canvas’ that is the CDDA code)
  • Open codeblocks and open the projectfile from the CDDA github code. (CataclysmWin.cbp)
  • In codeblocks go to ‘settings’ ‘compiler’, with the selected compiler ‘GNU GCC Compiler’ select the checkbox ‘Have g++ follow the C++11 ISO C++ Language standard [-std=c++11]’. (Else I got a warning about a const constexp something).
  • Try to build the project.
  • See the warning about some sort of git problem
  • Do this: http://smf.cataclysmdda.com/index.php?topic=11414.msg252569#msg252569
  • Build the project.
  • Get several unhelpful errors. (Red errors without references to specific lines of code, this means the compiler has no problems, but the linker has. Which means some files are probably missing from the project code).
  • Ideally now find the specific files missing from the code. (In my case it was ‘emit.cpp’ and ‘emit.h’). But a brute force method is to go to the project tab (default on the left: http://prntscr.com/boh1t1 ). Right click on the src file, select ‘add files’. Select all the .cpp and .h files. And add them all.
  • Build, and wait for the program to compile without errors.
  • Select run (http://prntscr.com/boh31r). And see CDDA in console mode game screen pop up.

This worked for me. Hope it helps.

[quote=“Soyweiser, post:27, topic:1128”]I got it running easily enough. Some files are missing from the codeblocks project file (and had to do the ‘remove the git call’ editing). And I have only been trying the console version so far. But it seems to work a lot better than before.

Didn’t even need to download mingw, as the newest version of codeblocks seemed to work.

Here is my guide:

  • Install codeblocks ( codeblocks-16.01mingw-setup.exe )
  • Download the most recent github CDDA code. (I lied, I didn’t do this, I already have git running, and copied my own clone of CDDA, but that is a bit more advanced).
  • Unpack the github code in a project directory somewhere. (Not in the same directory as codeblocks (codeblocks is the tool, that works on your ‘canvas’ that is the CDDA code)
  • Open codeblocks and open the projectfile from the CDDA github code. (CataclysmWin.cbp)
  • In codeblocks go to ‘settings’ ‘compiler’, with the selected compiler ‘GNU GCC Compiler’ select the checkbox ‘Have g++ follow the C++11 ISO C++ Language standard [-std=c++11]’. (Else I got a warning about a const constexp something).
  • Try to build the project.
  • See the warning about some sort of git problem
  • Do this: http://smf.cataclysmdda.com/index.php?topic=11414.msg252569#msg252569
  • Build the project.
  • Get several unhelpful errors. (Red errors without references to specific lines of code, this means the compiler has no problems, but the linker has. Which means some files are probably missing from the project code).
  • Ideally now find the specific files missing from the code. (In my case it was ‘emit.cpp’ and ‘emit.h’). But a brute force method is to go to the project tab (default on the left: http://prntscr.com/boh1t1 ). Right click on the src file, select ‘add files’. Select all the .cpp and .h files. And add them all.
  • Build, and wait for the program to compile without errors.
  • Select run (http://prntscr.com/boh31r). And see CDDA in console mode game screen pop up.

This worked for me. Hope it helps.[/quote]

This worked great! But it didn’t compile the tile version?

Are we able to compile the tile version?

Yes, a guide for compiling the Tiles version would be nice.

the Spoilers are incomplete/ don’t show anything in Firefox or Chrome. isn’t just me, ChestHole has seen it as well. Photos are missing. if you can, Please enclose in post? thanks for the help. have a wonderful day.