Chris-plus-alphanumericgibberish / dnethack

A variant of nethack 3.4.3
35 stars 13 forks source link

When trying to compile on Win 8.1 having troubles with eat.o #14

Open TyroneSawyer opened 8 years ago

TyroneSawyer commented 8 years ago

I've tried to compile using three methods now, using Cygwin, then mingw32 twice (two different methods) and both Cygwin and one of the mingw32 methods said they found a problem with the eat.o.

Cygwin was saying something about the protoype seclartion for the nutrition value (nutval) being different from another part. (eat.c?)

Here is the error:

cc -O -I../include -c -o eat.o eat.c eat.c: In function ‘givit’: eat.c:950:7: error: argument ‘nutval’ doesn’t match prototype short nutval; ^ In file included from ../include/config.h:248:0, from ../include/hack.h:9, from eat.c:5: eat.c:33:23: error: prototype declaration STATICDCL void FDECL(givit, (int,struct permonst , unsigned short, boolean)); ^ ../include/tradstdc.h:124:21: note: in definition of macro ‘FDECL’

define FDECL(f,p) f p

                 ^
: recipe for target 'eat.o' failed make[1]: *_\* [eat.o] Error 1 make[1]: Leaving directory '/DH/dnethack-3.4.3/src' Makefile:88: recipe for target 'nethack' failed make: **\* [nethack] Error 2

Mingw32 only mentioned eat.o for it's failure.

I have some more info over on rec.games.roguelike.nethack if you want.

Ozma777 commented 8 years ago

adding from the Nao source eat.c line 33 should be changed (replaced by): STATIC_DCL void FDECL(givit, (int,struct permonst *,SHORT_P,BOOLEAN_P));

ERRORS OUT...pickup.c

C:\GAMES\binary\dnethack\src>mingw32-make -f makefile.gcc install 1>out.txt ../src/mon.c:59:19: warning: conflicting types for built-in function 'pow' [enab led by default] ../src/pickup.c: In function 'doloot': ../src/pickup.c:1599:4: error: too many arguments to function 'use_lightsaber' ../src/pickup.c:40:16: note: declared here mingw32-make: *\ [o/pickup.o] Error 1

different compiler, but change line 33 in eat.c NOW if we can figure out how to get pickup.c to also work maybe the game will compile.

Ozma777 commented 8 years ago

ok so....

line 1594 ( starts with } else if(is_lightsaber(cobj) && ....etc)

I replaced dnethack code with the Dnao code (again) from the "}" all the way to the next "}"

} else if(is_lightsaber(cobj) && cobj->oartifact != ART_ANNULUS){ Sprintf(qbuf, "There is %s here, open it?",an(xname(cobj))); c = ynq(qbuf); if (c == 'q') return (timepassed); if (c == 'n') continue; timepassed |= use_lightsaber(cobj); if(timepassed) underfoot = TRUE; }

NOW LAST PROBLEM SOLVED:

go into the dat folder and RENAME DrowNoble.des and HeDrowNoble.des ....(adding a space) Drow Noble.des and HeDrow Noble.des

Ozma777 commented 8 years ago

Oh and if you want graphical version (not tty) I am afraid you will need to solve this error:

C:\GAMES\temp\dnethack\src>mingw32-make -f makefile.gcc install 1>out.txt ../win/win32/mswproc.c: In function 'mswin_player_selection': ../win/win32/mswproc.c:269:5: error: too few arguments to function 'randrole' ../include/extern.h:1981:7: note: declared here ../win/win32/mswproc.c: In function 'prompt_for_player_selection': ../win/win32/mswproc.c:381:7: error: too few arguments to function 'randrole' ../include/extern.h:1981:7: note: declared here ../win/win32/mswproc.c:417:7: error: too few arguments to function 'randrole' ../include/extern.h:1981:7: note: declared here mingw32-make: *\ [o/mswproc.o] Error 1

REPLACING with dNAO code does NOT fix this, maybe standard nethack copy/paste function? I'll try that and see, if it works I'll try and email Chris-plus the NEW dnethack-master.zip with precompiled dnethack.zip and dnethackW.zip AND updated working source.

TyroneSawyer commented 8 years ago

You are a god. Thank you!