[rec.games.hack] Help! Can't compile NH3.0!

2014_5001@uwovax.uwo.ca (07/27/89)

Help!  I can't compile NHack3.0 under TurboC 2.0!

Despite my undefining of TERMLIB, it still wants the TERMLIB.
After making some ad hoc changes to termcap.c, it compiled, but halted (I
disabled all the extra options) when I ran nethack.exe.

Some code like msdos.c is clearly not set up for TurboC (#ifdef MSDOS as the
first line doesn't work:  change to #if defined(MSDOS) || defined(__MSDOS__).

Some little things like missing paranthesis, errors in mhitu if MEDUSA is
undefined were annoying.

All I want is a PC binary.  I cannot compile it.  Has someone actually compiled
under Turbo C, or did someone just make up Makefile.tcc?  Are the binaries
available?  I don't have TERMLIB.  The docs say it is included in
TERM[LIB|CAP].ARC.  It is not (my distribution is from linc.cis.upenn.edu
/pub/NH3.0/*).

Any help would be appreciated.

-- 
! Alexander Pruss, at one of: Department of Applied Mathematics, Astronomy, !
! Mathematics, or Physics                     University of Western Ontario !
! pruss@uwovax.uwo.ca         pruss@uwovax.BITNET          A5001@nve.uwo.ca !
! If I don't respond:  try   mayhem@uwovax.BITNET  or  mayhem@uwovax.uwo.ca !

linhart@topaz.rutgers.edu (Mike Threepoint) (07/28/89)

The 2014_5001@uwovax.uwo.ca writes:
> Help!  I can't compile NHack3.0 under TurboC 2.0!
> 
> Despite my undefining of TERMLIB, it still wants the TERMLIB.
> After making some ad hoc changes to termcap.c, it compiled, but halted (I
> disabled all the extra options) when I ran nethack.exe.

Unfortunately, TERMCAP.ARC was not distributed with 3.0.  It contained Fred
Fish's TERMLIB.LIB sources.  It was distributed with either or both of 2.2 and
2.3, however, which are available by anonymous ftp from the comp.sources.games
archives on uunet.uu.net.

> Some code like msdos.c is clearly not set up for TurboC (#ifdef MSDOS as the
> first line doesn't work:  change to #if defined(MSDOS) || defined(__MSDOS__).

Instead, move the '#include "hack.h"' line to above the #ifdef MSDOS.  hack.h
includes config.h, where the #define MSDOS lives.

> All I want is a PC binary.  I cannot compile it.  Has someone actually compiled
> under Turbo C, or did someone just make up Makefile.tcc?

No, actually Makefile.pc is the one that was made up, and it has a few
problems (mkshop.c was renamed to mkroom.c, some files added later are
missing).

I have compiled it under Turbo C (repeatedly), and will submit a binary to
comp.binaries.ibm.pc, after we release the first bugfix patch.

haletky@iceland.crd.ge.com (edward l haletky) (07/28/89)

Neither can I. I do not have anon ftp capabilities. Could someone mail
me the TERMLIB.LIB library mentioned...Thanks in advance...
== Edward L. Haletky ==========| \====|\====================================== 
General Electric Company       |--------- Internet:haletky@iceland.crd.ge.com 
Bldg K-1,Room 5B42,P.O. Box 8  |--------- UUnet: uunet!crdgw1!iceland!haletky
Schenectady, NY 12301 =========| /====|/======================================

ca121@citycs.UUCP (D BROWNLEE) (08/01/89)

When trying to compile NH on a Gould UTX/32 6040 Computer it all works ok
untill I get to pri.c - where the compiler crashes out due to (I think) a
symbol table overflow? If the file is split up it'll do the first 200 odd
lines ok, but no more!

	Thranks

-------------------------------------------------------------------------

martin@rb-dc1.UUCP (Albert A. Martin) (08/03/89)

In article <114@citycs.UUCP> ca121@city.cs.ac.uk (D BROWNLEE) writes:
>When trying to compile NH on a Gould UTX/32 6040 Computer it all works ok
>untill I get to pri.c - where the compiler crashes out due to (I think) a
>symbol table overflow? If the file is split up it'll do the first 200 odd
>lines ok, but no more!
>

Here are the changes I made to the sources in order to compile nethack3
on a Gould PN/9080 (and also a Gould NP1):

Makefile:
	Warning!
	Installing the game into an existing directory erases its contents.
	Comment out  'rm -rf $(GAMEDIR)'.

src/Makefile:
	Missing terminal routines.
	Define TERMLIB as '-lcurses -ltermcap'.

src/mkroom.c, line 442:
	'sel' is defined for Gould machines.
	Just above it, add '#undef sel'.

src/pri.c, line 219:
	Line causes compiler to choke-- too complex.
	Break out the parenthesised assignments as separate statements.

src/uhitm.c, line 294:
	Compiler bug emits bad code for this return statement.
	Add static int kludge;... return(kludge=malive);

 --

Until August 11th:
-----------------
Al Martin	Encore Computer Corp.	[formerly Gould Inc. GSD]
USMail	:	15378 Avenue of Science, San Diego, CA 92128
Pa Bell	:	(619) 485-0910 x243
UUCP	:	...sdcsvax!ncr-sd!rb-dc1!martin

Starting August 14th:
--------------------
Al Martin	Intergraph Corp., Advanced Processor Division
USMail	:	2400 Geng Road, Palo Alto, CA 94303
Pa Bell	:	(415) 494-8800
UUCP	:	...pyramid!garth!martin   (I think)