[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Compiling the server
. . -> [Subject]  Compiling ROM 2.4b6OLC with Cygwin

Compiling ROM 2.4b6OLC with Cygwin

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Mrjones   (3 posts)  [Biography] bio
Date Wed 02 May 2001 02:08 AM (UTC)
Message
I have the latest version of cygwin and rom source. I unpack it into a directory, then fire up a command prompt and do a make with mt fingers and eyes crossed.....

gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND act_comm.c
.
.
.
.
.
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND special.c
special.c: In function `spec_string':
special.c:1037: subscripted value is neither array nor pointer
make: *** [special.o] Error 1

ouch. I am a VB programmer who is learning C and this error makes no sense. Its a new function for OLC and it looks like a pointer but I dont see an error. Here is my makefile if it helps.

CC = gcc
PROF = -O -g
NOCRYPT = -DNOCRYPT
C_FLAGS = -Wall $(PROF) $(NOCRYPT) -DOLD_RAND
L_FLAGS = $(PROF)
LIBS = -lcrypt

O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o \
handler.o healer.o interp.o note.o lookup.o magic.o magic2.o \
music.o recycle.o save.o scan.o skills.o special.o tables.o \
update.o NewMagic.o act_newc.o remort.o bank.o

rom: $(O_FILES)
rm -f rom
$(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)

.c.o: merc.h
$(CC) -c $(C_FLAGS) $<


Thanks alot. You rock

-Bannon
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 02 May 2001 03:04 AM (UTC)
Message
When you say the "latest" ROM source, that can mean different things to different people. Latest on what server, for instance?

Can you please specify the exact version number of ROM you are compiling, the exact name of the file you downloaded (the .gz or similar file) and where you got it.

Then I can try that particular version. I didn't get that error compiling "standard" ROM, so I think the version you have got will make the difference.

I think I compiled 2.4 b2 and 2.4 b6, but I'm not absolutely sure which one compiled OK, or whether both did.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Mrjones   (3 posts)  [Biography] bio
Date Reply #2 on Wed 02 May 2001 04:10 PM (UTC)

Amended on Tue 20 Nov 2007 04:19 AM (UTC) by Nick Gammon

Message
Sorry. The title of the post was the filename, but i didnt put on the extension...

Filename: Rom24b6OLC.tar.gz
location: http://www.smaug.org/cgi-bin/directory?/pub/mud/diku/merc/rom

I was able to patch the r24b4 version with ivans olc 171, but whenever I tried saving my immort character the mud crashed :) so I figured I's try the pre-patched version above.


thnx again
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Wed 02 May 2001 10:23 PM (UTC)
Message
My apologies. By the time I had scrolled down to read your message the subject had vanished off the screen and I didn't notice the version number. :)

I got it to compile and link with two changes:

In special.c at line 1037, change:


for ( cmd = 0; spec_table[cmd].function[0] != '\0'; cmd++ )


to:


for ( cmd = 0; spec_table[cmd].function; cmd++ )



In olc_act.c at line 199, change:


for (spec = 0; spec_table[spec].function[0] != '\0'; spec++)


to:


for (spec = 0; spec_table[spec].function; spec++)




- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,537 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]