View Single Post
Old January 9, 2022, 03:28   #3
Join Date: Oct 2021
Location: WA
Posts: 237
smbhax is on a distinguished road
Originally Posted by backwardsEric View Post
Commenting out lines 69 and 70 of files.c (extra definitions of player_uid and player_egid that duplicate ones in variable.c) should fix that linker error.

For posterity, you might edit the link in the original post so it points to Hellband 's source code at rather than Hengband's source code.
Let posterity record that I am a noob who can't handle trying to compile multiple 'bands at once! Link corrected. : ) And that files.c fix did the trick!

That got me far enough to realize makefile.cyg was for compiling a Windows graphics build, and I should be using an option in instead if I wanted a Linux/Cygwin ASCII build. And ah yes there were two 'SPECIAL_BSD" ("moves curses") sections of code in main-gcu.c that didn't want to compile either; I commented them out, which let the game compile, and *seems* to work okay in the game itself, although I don't really know what they did.

But I did eventually compile a seemingly working ASCII version of Hellband for Cygwin in Windows by doing the following, all told:

- Download the source: from
- Extract it somewhere; these steps assume that you extract it to a new directory under your Cygwin '~' called 'hellband,' in such a way that you end up with Hellband's root directory (ie where 'hellband.cfg' is) as Cygwin's /home/[username]/hellband/

- In /src/files.c, comment out lines 69 and 70 (thanks backwardsEric!)
- In /src/main-gcu.c, comment out the 'SPECIAL_BSD' sections, ie lines 465-471 and lines 542-548 (these are 'ifdef' statements, and as backwardsEric showed here , you can comment ifdefs out by surrounding them in a null 'if' statement, with '#if 0' in the line above their '#if," and '#endif' in the line below their '#endif')
(^ I don't know how critical those SPECIAL_BSD statements were; with them gone, the game compiles, and *seems* to run okay, although when having the game quit abruptly on me due to trying different compile options at one point, I did find myself with a frozen cursor in Cygwin; I wonder if that's the kind of thing they were meant to fix. There's almost certainly a better fix for them not compiling than just commenting them out.)

- In /src/
-- In the '## Variation -- Only support "main-gcu.c" (not "main-x11.c")' section:
--- Uncomment lines 138 and 139, 'CFLAGS' and 'LIBS'
--- Delete '-ltermcap' from LIBS (line 139)
-- Completely comment out the '## Variation -- compfile for Ternux' section (lines 173-177)

- Create a /lib/dump directory (avoids crash using "~" "Display current knowledge" menu)

- Run Cygwin and enter:
cd hellband/src

Then from Cygwin's '~' home (ie 'cd ../..' from the 'src' directory) you can run


Game notes:
- No subwindow support
- ESC is a bit laggy; '`' ('~' 'tilde' key, directly under the ESC key on most keyboards) works better (Possible fix: )
- Can't use SHIFT+[arrow key] to run; can use '.' then [arrow key], or SHIFT+[VI key] ('Rogue-like commands' interface option)
My roguelike gameplay videos

Last edited by smbhax; February 6, 2022 at 11:06.
smbhax is offline   Reply With Quote