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 ➜ SWR server

SWR server

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


Pages: 1 2  

Posted by Shadoan   Canada  (21 posts)  Bio
Date Tue 27 Mar 2001 06:26 PM (UTC)
Message
SWR for windows. I tried to get it to work, since its only a .bat file but it wouldn't run, so I downloaded the source code and tried running the .bat file with it but it didn't work so I went to kyndig.com and downloaded their source code, it ran this time but had so many errors it was loading for 5 minutes, I don't know whats wrong with it....

Edge of Darkness MUD and Hosting Service,
Head Administrator(Retired)
All your SWR needs, right here, right now.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 27 Mar 2001 06:51 PM (UTC)
Message

I am not sure what batch file you are referring to. The port of SWR that I did is at ftp://ftp.gammon.com.au/smaug/StarWars.zip. This is not a batch file, it is a 551 Kb zip file with a new .exe file for SMAUG in it. This should replace the smaug.exe file in the normal SMAUG download.

The source files are at ftp://ftp.gammon.com.au/smaug/StarWarsSce.zip.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #2 on Wed 28 Mar 2001 10:42 AM (UTC)
Message
this is off the subject but still with SWR code...
i got the actual code from:

http://www.swreality.co.uk/swr-2.0a2.tar.gz

and this is the other error i got

make ../bin/swr
make[1]: Entering directory `/home/jmartin4/swr-2.0/src'
gcc -c -g3 -Wall fight.c
fight.c:8: sys/dir.h: No such file or directory
make[1]: *** [fight.o] Error 1
make[1]: Leaving directory `/home/jmartin4/swr-2.0/src'
make: *** [all] Error 2

there is a directory called system which i changed
to sys but its still not finding it... also tweaked
the makefile to what i need in there, still the same
problem... any suggestions?

or.. i could always get the windows one running, but
that didn't make too much sense, plus it gave me a
spamming error about not finding everything...
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 29 Mar 2001 02:51 AM (UTC)

Amended on Sun 01 Apr 2001 08:09 PM (UTC) by Nick Gammon

Message
Here is how I got it to compile:



1. Edit fight.c, and also save.c, and change the line "#include <sys/dir.h>", as follows:


#include <dirent.h>





2. Edit the file c:/cygwin/usr/include/sys/time.h

and at around line 41, change the "#if defined" line as follows:


/* BSD time macros used by RTEMS code */
//#if defined(__rtems__)
#if 1





3. Edit the file save.c and change the line at line 1777 from:


struct direct *de;


to


struct dirent *de;





4. Changed the third line of file "Makefile" to:


NOCRYPT = -DNOCRYPT


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #4 on Sun 01 Apr 2001 11:10 AM (UTC)
Message
this is the error now, pretty much the same...

make ../bin/swr
make[1]: Entering directory `/home/jmartin4/swr-2.0/src'
gcc -c -g3 -Wall -DNOCRYPT fight.c
fight.c:8: direct.h: No such file or directory
make[1]: *** [fight.o] Error 1
make[1]: Leaving directory `/home/jmartin4/swr-2.0/src'
make: *** [all] Error 2

my time.h looks like this though

/* time.h -- An implementation of the standard Unix <sys/time.h> file.
Written by Geoffrey Noer <noer@cygnus.com>
Public domain; no rights reserved. */

#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_

#include <_ansi.h>
#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _WINSOCK_H
struct timeval {
long tv_sec;
long tv_usec;
};

struct timezone {
int tz_minuteswest;
int tz_dsttime;
};

#ifdef __CYGWIN__
#include <sys/select.h>
#endif /* __CYGWIN__ */

#endif /* _WINSOCK_H */

#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2

struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};

int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
int _EXFUN(utimes, (const char *__path, struct timeval *__tvp));
int _EXFUN(getitimer, (int __which, struct itimerval *__value));
int _EXFUN(setitimer, (int __which, const struct itimerval *__value,
struct itimerval *__ovalue));

#ifdef __cplusplus
}
#endif
#endif /* _SYS_TIME_H_ */

kind of unorganized, but that is what it looks like.
i don't see any #if defined in there... unless i'm blind
and yeah that is the one from usr/include/sys/ in cygwin
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 01 Apr 2001 05:27 PM (UTC)
Message
Well, that's a strange thing. You must have an earlier version of cygwin or something. My version of time.h looks similar, except that the following lines are before the line:

int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));



/* BSD time macros used by RTEMS code */
//#if defined(__rtems__)
#if 1
/* Convenience macros for operations on timevals.
   NOTE: `timercmp' does not work for >= or <=.  */
#define	timerisset(tvp)		((tvp)->tv_sec || (tvp)->tv_usec)
#define	timerclear(tvp)		((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define	timercmp(a, b, CMP) 						      \
  (((a)->tv_sec == (b)->tv_sec) ? 					      \
   ((a)->tv_usec CMP (b)->tv_usec) : 					      \
   ((a)->tv_sec CMP (b)->tv_sec))
#define	timeradd(a, b, result)						      \
  do {									      \
    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;			      \
    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;			      \
    if ((result)->tv_usec >= 1000000)					      \
      {									      \
	++(result)->tv_sec;						      \
	(result)->tv_usec -= 1000000;					      \
      }									      \
  } while (0)
#define	timersub(a, b, result)						      \
  do {									      \
    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;			      \
    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;			      \
    if ((result)->tv_usec < 0) {					      \
      --(result)->tv_sec;						      \
      (result)->tv_usec += 1000000;					      \
    }									      \
  } while (0)
#endif

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #6 on Sun 01 Apr 2001 06:19 PM (UTC)
Message
updated the cygwin, but now getting tons
of errors... unrelated to the mud code itself...
gonna try to reinstall, but i'm getting this error.

make ../bin/swr
make[1]: Entering directory `/home/jmartin4/starwars/src'
gcc -c -g3 -Wall -DNOCRYPT act_comm.c
gcc: installation problem, cannot exec `/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-1/cpp0.exe': Permission denied
make[1]: *** [act_comm.o] Error 1
make[1]: Leaving directory `/home/jmartin4/starwars/src'
make: *** [all] Error 2

then i get a windows error: error starting program
The CPP0.exe file is linked to missing export cygwin1.dll:getrlimit.

no clue, but i think i prolly have to reinstall it.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #7 on Sun 01 Apr 2001 06:24 PM (UTC)

Amended on Sun 01 Apr 2001 06:25 PM (UTC) by Nick Gammon

Message
I think I would completely remove cygwin, and then re-install it (from the latest version from their site). Save or rename your home directory first, I'm not sure whether that gets removed as well.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #8 on Sun 01 Apr 2001 06:29 PM (UTC)
Message
nope :)
the problem was the cygwin1.dll file in windows\system
wasn't the correct one... i moved the one in C:\cygwin
into system and it works fine except the usual code
buggies now. ;)
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #9 on Sun 01 Apr 2001 06:32 PM (UTC)
Message
here's the problem now....

make ../bin/swr
make[1]: Entering directory `/home/jmartin4/starwars/src'
gcc -c -g3 -Wall -DNOCRYPT fight.c
fight.c:8: direct.h: No such file or directory
make[1]: *** [fight.o] Error 1
make[1]: Leaving directory `/home/jmartin4/starwars/src'
make: *** [all] Error 2

doesn't know where this direct.h file is that you told
me to add in....
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #10 on Sun 01 Apr 2001 08:09 PM (UTC)
Message
Looks like a typo.

My file had "dirent.h" not "direct.h".


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #11 on Sun 01 Apr 2001 08:34 PM (UTC)
Message
*laugh* oopsie. ;)

thanks for noticing that...
i don't think i ever would have.
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #12 on Sun 01 Apr 2001 09:08 PM (UTC)
Message
OK... here's the latest... doesn't seem to be finding
the exe, but i couldn't find it anywhere....

make ../bin/swr
make[1]: Entering directory `/home/jmartin4/swr/src'
rm -f ../bin/swr
gcc -o ../bin/swr act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o comm.o const.o db.o fight.o handler.o hashstr.o id.o interp.o m
agic.o makeobjs.o misc.o mud_comm.o mud_prog.o player.o requests.o reset.o save.
o shops.o skills.o special.o tables.o track.o update.o space.o morespace.o swski
lls.o planets.o vote.o -lm # -lcrypt
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-2/../../../../i686-pc-cygwin/bin/ld: cann
ot open output file ../bin/swr.exe: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [../bin/swr] Error 1
make[1]: Leaving directory `/home/jmartin4/swr/src'
make: *** [all] Error 2
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #13 on Sun 01 Apr 2001 09:15 PM (UTC)
Message
Mine ended up in the bin directory (ie. go up one level and then down to bin).


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Translucent Hate   USA  (48 posts)  Bio
Date Reply #14 on Sun 01 Apr 2001 10:57 PM (UTC)
Message
maybe i'm not following... my swr directory used to
be called starwars, and it gave the same error with
swr.exe and in the gzp i never saw a swr.exe, so
is it just creating this file somewhere, because
i can't find it whatsoever....
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.


62,666 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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.