Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Problem with SWFOTE 2.1 compile: swr.exe not generated

Problem with SWFOTE 2.1 compile: swr.exe not generated

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


Posted by GradiumX   (2 posts)  Bio
Date Wed 09 Apr 2008 02:15 PM (UTC)
Message
Hello everyone. Its nice to meet you! Unfortunately I've been working very hard to no avail to compile my first ever SWR mud.

I plan to use this solely to build complex level projects and then be able to build offline for other SWR Muds that are looking for projects.

That aside...

My problem I guess is getting the swr.exe to actually appear AND remain there!

What's very strange is that I receive no errors in the compile, and the swr.exe appears momentarily before disappearing again!

Here is my makefile source:

CC = gcc
PROF =
NOCRYPT =

#Uncomment the line below if you are getting undefined references to dlsym, dlopen, and dlclose.
#Comment it out if you get errors about ldl not being found.
NEED_DL = -ldl

#Uncomment if using CYGWIN to compile with
CYGWIN_FLAG = -DCYGWIN

#Some systems need this for dynamic linking to work.
EXPORT_SYMBOLS = -export-dynamic

C_FLAGS = -g2 -Wall $(EXPORT_SYMBOLS) $(CYGWIN_FLAG) $(PROF) $(NOCRYPT) $(DBUGFLG) $(EXPORT_SYMBOLS)
L_FLAGS = $(PROF) $(EXPORT_SYMBOLS) $(CYGWIN_FLAG) $(NEED_DL) -lz -g2

#Comment out to disable cargo
USECARGO = 1

ifdef USECARGO
C_FLAGS := $(C_FLAGS) -DUSECARGO
endif


C_FILES = 11.c act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
bounty.c build.c changes.c clans.c color.c comm.c comments.c \
const.c copyover.c db.c editor.c fight.c finfo.c force.c \
fskills.c functions.c handler.c hashstr.c hunter.c interp.c keb.c \
magic.c makeobjs.c marriage.c md5.c mccp.c misc.c mud_comm.c \
mud_prog.c newarena.c pfiles.c planets.c player.c renumber.c reset.c \
save.c ships.c shops.c skills.c slay.c slicers.c slotm.c \
space.c special.c swskills.c tables.c tech.c track.c update.c


O_FILES := $(patsubst %.c,o/%.o,$(C_FILES))

H_FILES = $(wildcard *.h)

ifdef CYGWIN_FLAG
SWR = swr.exe
else
SWR = swr
endif

SWR_OLD = ../bin/swr_old.exe
COPYFILE = ../bin/cygwin/copyfile

all:
$(MAKE) -s swr

# pull in dependency info for *existing* .o files
-include dependencies.d

swr: $(O_FILES)
rm -f $(SWR)
ifdef CYGWIN_FLAG
echo "Generating dependency file ...";
$(CC) -MM $(C_FLAGS) $(C_FILES) > dependencies.d
perl -pi -e 's.^([a-z]).o/$$1.g' dependencies.d
dlltool --export-all --output-def swr.def $(O_FILES)
dlltool --dllname $(SWR) --output-exp swr.exp --def swr.def
$(CC) -o $(SWR) $(O_FILES) swr.exp $(L_FLAGS)
else
$(CC) -o $(SWR) $(O_FILES) $(L_FLAGS)
endif
echo " ";
echo "Done compiling mud.";
chmod g+w $(SWR)
chmod a+x $(SWR)
chmod g+w $(O_FILES)
ifdef CYGWIN_FLAG
./$(COPYFILE)
endif
mv $(SWR) ../bin

clean:
ifdef CYGWIN_FLAG
rm -f o/*.o ../bin/other/swr.def ../bin/cygwin/swr.exp
chmod g+w $(COPYFILE)
chmod a+x $(COPYFILE)
./$(COPYFILE)
# $(MAKE) all
else
rm -f o/*.o $(SWR_OLD) ../bin/$(SWR) ../bin/${SWR}.exe ../bin/win/swr.def ../bin/cygwin/swr.exp
# $(MAKE) all
endif


purge:
ifdef CYGWIN_FLAG
rm -f o/*.o ../bin/cygwin/swr.def ../bin/cygwin/swr.exp dependencies.d
else
rm -f o/*.o $(SWR_OLD) $(SWR) ../bin/cygwin/swr.def ../bin/cygwin/swr.exp
endif


o/%.o: %.c
# echo " Compiling $@....";
echo " $@";
$(CC) -c $(C_FLAGS) $< -o $@

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


-- End Makefile -- (This line is not in the source haha)

Thank you for your help! I sincerely hope I can get this working so I can begin building worlds again :)

-Gradium

GradiumX@yahoo.com

Email: GradiumX@yahoo.com
Proficiency: SWR Area Designer / Builder
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Wed 09 Apr 2008 05:07 PM (UTC)
Message
It looks like it moves swr.exe to the bin/ directory.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by GradiumX   (2 posts)  Bio
Date Reply #2 on Wed 09 Apr 2008 05:11 PM (UTC)
Message
David thank you so much for your prompt reply!!

I feel as if I've shed just one more layer off my newbish self :)

Much obliged ^_^

Email: GradiumX@yahoo.com
Proficiency: SWR Area Designer / Builder
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Wed 09 Apr 2008 05:16 PM (UTC)

Amended on Wed 09 Apr 2008 09:28 PM (UTC) by Nick Gammon

Message
No problem. :) I think it's actually kind of unusual for a program to actually move the file into the bin directory; normally you compile into the src directory and then an install command will copy the files into the appropriate final location. I would also have been surprised to see the file go away... But when in doubt, look at the makefile! It looks like gibberish at first but it's not so bad, really... ;)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
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,456 views.

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

Go to topic:           Search the forum


[Go to top] top

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