Problem compiling Rom246OLC

Posted by Terron on Tue 15 Jan 2002 12:22 PM — 6 posts, 22,111 views.

#0
I currently have Cygnus running on Win 98 with GCC.

I downloaded rom source from ftp://ftpgame.org/pub/mud/diku/merc/rom/Rom24b6OLC.tar.gz

I get this error message when try to compile:

[rom24]$make
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND act_comm.c
act_comm.c: In function `do_delete':
act_comm.c:67: `PLAYER_DIR' undeclared (first use in this functio
act_comm.c:67: (Each undeclared identifier is reported only once
act_comm.c:67: for each function it appears in.)
make: *** [act_comm.o] Error 1


Now, i take it that somewhere Player_dir has not been defined? which i thought was in merc.h? but it seems to be their.

Any clues?
Amended on Tue 20 Nov 2007 04:18 AM by Nick Gammon
Australia Forum Administrator #1
Yes, if the platform is defined (eg. unix) see below.




#if defined(unix)
#define PLAYER_DIR "../player/" /* Player files */
#define GOD_DIR "../gods/" /* list of gods */
#define TEMP_FILE "../player/romtmp"
#define NULL_FILE "/dev/null" /* To reserve one stream */
#endif


Try adding -Dunix and see what happens.

#2
I'm not sure which file to try it in, so tryed it in the makefile, Merc.h and the Act_comm.c file. None of them seemed to work?

Perhaps i'm putting it in the wrong place?

Could you describe where to put the -DUNIX?
Australia Forum Administrator #3
At the start of Makefile, you could put it ...


CC = gcc
PROF = -O -g
NOCRYPT =
C_FLAGS = -Wall $(PROF) $(NOCRYPT) -Dunix
L_FLAGS = $(PROF)



"unix" is lower case, not UNIX.
#4
I tried compiling it and it got past db.o and the others but then it got this


special.c: In function `spec_string':
special.c:1037: subscripted value is neither array nor pointer
make: *** [special.o] Error 1

Australia Forum Administrator #5
Can't explain that. Can you post a few lines around line 1037 in special.c, such as 1030 to 1040?