Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Solution to running swFotE 2.0 with cygwin
Solution to running swFotE 2.0 with cygwin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Seifert
(1 post) Bio
|
Date
| Tue 02 Aug 2005 01:27 AM (UTC) |
Message
| I have found out how do to this, after about an hour.
All you have to do is go in your ~cygwin\usr\include\sys directory, and place a .h file with the following in it.
#ifndef _SYS_DIR_H_
#define _SYS_DIR_H_
#include <dirent.h>
/*
* Backwards compatibility.
*/
#define direct dirent
#define DIRSIZ(dp) _GENERIC_DIRSIZ(dp)
#endif /* !_SYS_DIR_H_ */
Theren there is an error "cannot find -ldl"
There is something wrong with the "L_FLAGS" in the makefile, and without them, you cannot move or look in the MUD, but it will still start up. If anyone has any ideas, please help me.
| Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #1 on Tue 02 Aug 2005 03:35 AM (UTC) |
Message
| It is a linking probleem. -ldl is required for dlsym support. SWFotE seems dependant on it, so I guess you better download it. I personally don't know much about it, so maybe someone else can tell you more.
Oh, and you shouldn't run anything that complains of a linker error, thats just not good practice. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #2 on Tue 02 Aug 2005 07:12 AM (UTC) |
Message
|
Quote: Oh, and you shouldn't run anything that complains of a linker error, thats just not good practice. It's actually impossible to run something that had linker errors. It's the linking phase that generates the executable and without a successful link, you have no program to run. Whatever was run was the old executable. As for being able to connect but not move or look around, that'd have to be made a bit more precise so that we can start diagnosing the problem. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #3 on Tue 02 Aug 2005 08:10 AM (UTC) |
Message
| You are correct Kyilyan. I'm not sure what I was thinking.
Anyways, a new one wont work, but I'm sure the old one probably works fine besides the one problem. Dlsym is essentially the command hook, and without it you won't be able to use commands unless you download the correct files needed or simply revert back to using the functions in tables.c . In order to do that, you would have to readd all of the DECLARE_DO_FUN's, as I believe they were removed. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Samson
USA (683 posts) Bio
|
Date
| Reply #4 on Tue 02 Aug 2005 11:24 AM (UTC) |
Message
| Of course, if one were to want this fixed right, one could look over this part of our Makefile and adjust it as needed to fit:
afkmud: $(O_FILES)
rm -f $(AFKMUD)
ifdef WINDOZE
dlltool --export-all --output-def afkmud.def $(O_FILES)
dlltool --dllname $(AFKMUD) --output-exp afkmud.exp --def afkmud.def
$(CC) -o $(AFKMUD) $(O_FILES) afkmud.exp $(L_FLAGS)
else
$(CC) -o $(AFKMUD) $(O_FILES) $(L_FLAGS)
endif
echo "Done compiling mud.";
chmod g+w $(AFKMUD)
chmod a+x $(AFKMUD)
chmod g+w $(O_FILES)
It shouldn't be overly difficult to figure out how to adapt that, but without the "WINDOZE" sections the dlsym code won't work in Cygwin. | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #5 on Wed 26 Oct 2005 02:08 AM (UTC) |
Message
| What does the .h file need to be named? |
-------
Guido Sharpsword | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #6 on Wed 26 Oct 2005 02:10 AM (UTC) |
Message
| What .h file? You need to install dlsym, or do Samson's fix. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #7 on Wed 26 Oct 2005 02:23 AM (UTC) Amended on Wed 26 Oct 2005 02:27 AM (UTC) by Guido Sharpsword
|
Message
| Hrm, know where this is downloadable? I checked The Gammon FTP and regular DL section, plus did a goodle, and got like 20 pages of gobbldy goop! sorry if these ar noob questions, but I a noob to this sorta stuff.
And does it come with instructions, hehe |
-------
Guido Sharpsword | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #8 on Wed 26 Oct 2005 02:25 AM (UTC) |
Message
| It's most likely a Cygwin package (if you're using it) or a separate lib. Try Googling it. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #9 on Wed 26 Oct 2005 02:32 AM (UTC) |
Message
| Ok, since the google blew my mind (i'm still gonna try searching, just in case):
I don't have that text in my makefile, should I add it? it isn't AFKMUD, but FOTE (SWR, i believe, in the MAKEFILE). How can that be implemented? Again, sorry for being so annoying, |
-------
Guido Sharpsword | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #10 on Wed 26 Oct 2005 02:41 AM (UTC) |
Message
| Nevermind, I found it. I changed it to WINDOZE and it gave the same error. |
-------
Guido Sharpsword | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #11 on Wed 26 Oct 2005 02:58 AM (UTC) |
Message
| Sorry, I think I forgot to give the error:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status
make[1]: *** [swr] Error 1
make: *** [all] Error 2
Man, my head hurts! lol, And thanks for all the input. info, Zeno, yer my HERO! lol |
-------
Guido Sharpsword | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #12 on Wed 26 Oct 2005 08:31 AM (UTC) |
Message
| These are the important line, and are out of my makefile which runs on cygwin and has dlsym working fine.
dlltool --export-all --output-def swr.def $(O_FILES)
dlltool --dllname $(SWR) --output-exp swr.exp --def swr.def
$(CC) $(W_FLAGS) -o $(SWR) $(O_FILES) swr.exp $(L_FLAGS)
You'll have to adjust it slightly. Also, where ever you have -ldl, try removing it or commenting it out. It is unnessecary in cygwin.
If this doesn't work, please post your whole make file so we can see what your seeing. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #13 on Wed 26 Oct 2005 10:18 AM (UTC) Amended on Wed 26 Oct 2005 12:24 PM (UTC) by Guido Sharpsword
|
Message
| Ok, I thought it did it, but It didn't. I couldn't get the Look and movements to work. When I tried to make the swr.exe file again it wouldn't, it got to fight.o and gave this:
fight.c:49:23: sys/dir.h: No such file or directory
make[1]: *** [o/fight.o] Error 1
make: *** [all] Error 2
What's Up with that? |
-------
Guido Sharpsword | Top |
|
Posted by
| Guido Sharpsword
USA (37 posts) Bio
|
Date
| Reply #14 on Wed 26 Oct 2005 12:29 PM (UTC) |
Message
| Here is my Makefile:
CC = gcc
PROF =
NOCRYPT =
#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 db.c editor.c fight.c finfo.c force.c fskills.c \
functions.c handler.c hashstr.c hunter.c id.c interp.c magic.c \
makeobjs.c marriage.c md5.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
COPYFILE = ../bin/cygwin/copyfile
else
SWR = swr
endif
SWR_OLD = ../bin/swr_old.exe
all:
$(MAKE) -s swr
swr : $(O_FILES)
rm -f $(SWR)
ifdef WINDOZE
dlltool --export-all --output-def ../bin/cygwin/swr.def $(O_FILES)
dlltool --dllname $(SWR) --output-exp ../bin/cygwin/swr.exp --def ../bin/cygwin/swr.def
$(CC) $(W_FLAGS) -o $(SWR) $(O_FILES) ../bin/cygwin/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
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) $<
|
-------
Guido Sharpsword | 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.
67,228 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top