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
➜ SWRiP Make error
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
3
4 5
6
Posted by
| Phobos
(79 posts) Bio
|
Date
| Reply #45 on Wed 31 Oct 2007 10:40 PM (UTC) |
Message
| Ok when i do .c i get this
comm.c:void *zlib_alloc(void *opaque, unsigned int items, unsigned int size)
comm.c:void zlib_free(void *opaque, void *address)
comm.c: s->zalloc = zlib_alloc;
comm.c: s->zfree = zlib_free;
when i do .h i get this
mud.h:#include <zlib.h>
I'm not sure how this will help in seeking my answer as to know to fix this but if this helps please tell me what i should do next | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #46 on Wed 31 Oct 2007 10:42 PM (UTC) |
Message
| Nick suggested that you add the extern "C" stuff around zlib and then do a full recompile. Did you do that? If not, go do it. If so, what happened? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Phobos
(79 posts) Bio
|
Date
| Reply #47 on Wed 31 Oct 2007 10:47 PM (UTC) |
Message
| I have done that in mud.h are there other files i need to do that in?
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #48 on Wed 31 Oct 2007 11:25 PM (UTC) Amended on Wed 31 Oct 2007 11:27 PM (UTC) by Nick Gammon
|
Message
| I am not sure what you are doing, but I just installed Cygwin on this PC, downloaded swripv200.tar.gz and compiled it OK (and ran it) after making some minor changes. Here they are:
diff -c -r swrip200/src/Makefile swrip200_modified/src/Makefile
*** swrip200/src/Makefile Sun Jul 11 06:24:20 2004
--- swrip200_modified/src/Makefile Thu Nov 1 10:09:30 2007
***************
*** 1,6 ****
CC = g++
PROF =
! NOCRYPT =
#Uncomment the next line if you want MCCP support
#DBUGFLG = -DMCCP
C_FLAGS = -g3 -Wall $(PROF) $(NOCRYPT) $(DBUGFLG)
--- 1,6 ----
CC = g++
PROF =
! NOCRYPT = -DNOCRYPT
#Uncomment the next line if you want MCCP support
#DBUGFLG = -DMCCP
C_FLAGS = -g3 -Wall $(PROF) $(NOCRYPT) $(DBUGFLG)
diff -c -r swrip200/src/act_move.c swrip200_modified/src/act_move.c
*** swrip200/src/act_move.c Wed Jun 9 09:04:10 2004
--- swrip200_modified/src/act_move.c Thu Nov 1 09:41:56 2007
***************
*** 601,607 ****
bxit->distance = fulldist - distance;
}
}
! (EXIT_DATA *) pexit = xit;
return room;
}
--- 601,607 ----
bxit->distance = fulldist - distance;
}
}
! pexit = (EXIT_DATA **) xit;
return room;
}
diff -c -r swrip200/src/fight.c swrip200_modified/src/fight.c
*** swrip200/src/fight.c Wed Jun 9 09:04:10 2004
--- swrip200_modified/src/fight.c Thu Nov 1 09:45:20 2007
***************
*** 25,31 ****
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
! #include <sys/dir.h>
#include <errno.h>
#include "mud.h"
--- 25,31 ----
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
! #include <sys/dirent.h>
#include <errno.h>
#include "mud.h"
diff -c -r swrip200/src/save.c swrip200_modified/src/save.c
*** swrip200/src/save.c Wed Jun 9 09:04:10 2004
--- swrip200_modified/src/save.c Thu Nov 1 10:12:17 2007
***************
*** 25,31 ****
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
! #include <sys/dir.h>
#include "mud.h"
/*
--- 25,31 ----
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
! #include <dirent.h>
#include "mud.h"
/*
***************
*** 2142,2148 ****
void load_corpses( void )
{
DIR *dp;
! struct direct *de;
extern FILE *fpArea;
extern char strArea[MAX_INPUT_LENGTH];
extern int falling;
--- 2142,2148 ----
void load_corpses( void )
{
DIR *dp;
! struct dirent *de;
extern FILE *fpArea;
extern char strArea[MAX_INPUT_LENGTH];
extern int falling;
diff -c -r swrip200/src/space.c swrip200_modified/src/space.c
*** swrip200/src/space.c Sun Jul 11 05:46:47 2004
--- swrip200_modified/src/space.c Thu Nov 1 09:47:11 2007
***************
*** 26,32 ****
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
! #include <sys/dir.h>
#include "mud.h"
SHIP_DATA * first_ship;
--- 26,32 ----
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
! #include <sys/dirent.h>
#include "mud.h"
SHIP_DATA * first_ship;
diff -c -r swrip200/src/space2.h swrip200_modified/src/space2.h
*** swrip200/src/space2.h Sun Jul 11 05:44:09 2004
--- swrip200_modified/src/space2.h Thu Nov 1 09:47:33 2007
***************
*** 28,34 ****
#include <string.h>
#include <time.h>
#include <sys/stat.h>
! #include <sys/dir.h>
#include "mud.h"
#define MAX_TEMPLATETYPE 38
--- 28,34 ----
#include <string.h>
#include <time.h>
#include <sys/stat.h>
! #include <sys/dirent.h>
#include "mud.h"
#define MAX_TEMPLATETYPE 38
After changing those lines (the above is a diff file, but you can see the file names and line numbers if you want to do it manually), I typed "make" and got this:
$ make
make swrip
make[1]: Entering directory `/home/Owner/swrip200_modified/src'
g++ -c -g3 -Wall -DNOCRYPT act_comm.c
g++ -c -g3 -Wall -DNOCRYPT act_info.c
g++ -c -g3 -Wall -DNOCRYPT act_move.c
g++ -c -g3 -Wall -DNOCRYPT act_obj.c
g++ -c -g3 -Wall -DNOCRYPT act_wiz.c
g++ -c -g3 -Wall -DNOCRYPT boards.c
g++ -c -g3 -Wall -DNOCRYPT build.c
g++ -c -g3 -Wall -DNOCRYPT clans.c
g++ -c -g3 -Wall -DNOCRYPT comm.c
g++ -c -g3 -Wall -DNOCRYPT comments.c
g++ -c -g3 -Wall -DNOCRYPT const.c
g++ -c -g3 -Wall -DNOCRYPT db.c
g++ -c -g3 -Wall -DNOCRYPT fight.c
g++ -c -g3 -Wall -DNOCRYPT handler.c
g++ -c -g3 -Wall -DNOCRYPT hashstr.c
g++ -c -g3 -Wall -DNOCRYPT id.c
g++ -c -g3 -Wall -DNOCRYPT interp.c
g++ -c -g3 -Wall -DNOCRYPT magic.c
g++ -c -g3 -Wall -DNOCRYPT makeobjs.c
g++ -c -g3 -Wall -DNOCRYPT misc.c
g++ -c -g3 -Wall -DNOCRYPT mud_comm.c
g++ -c -g3 -Wall -DNOCRYPT mud_prog.c
g++ -c -g3 -Wall -DNOCRYPT krearena.c
g++ -c -g3 -Wall -DNOCRYPT player.c
g++ -c -g3 -Wall -DNOCRYPT requests.c
g++ -c -g3 -Wall -DNOCRYPT reset.c
g++ -c -g3 -Wall -DNOCRYPT save.c
g++ -c -g3 -Wall -DNOCRYPT shops.c
g++ -c -g3 -Wall -DNOCRYPT skills.c
g++ -c -g3 -Wall -DNOCRYPT special.c
g++ -c -g3 -Wall -DNOCRYPT tables.c
g++ -c -g3 -Wall -DNOCRYPT track.c
g++ -c -g3 -Wall -DNOCRYPT update.c
g++ -c -g3 -Wall -DNOCRYPT space.c
space.c: In function `void do_fire(CHAR_DATA*, char*)':
space.c:9755: warning: array subscript has type `char'
space.c:9757: warning: array subscript has type `char'
space.c:9759: warning: array subscript has type `char'
space.c:9769: warning: array subscript has type `char'
space.c:9771: warning: array subscript has type `char'
space.c:9773: warning: array subscript has type `char'
space.c:9783: warning: array subscript has type `char'
space.c:9783: warning: array subscript has type `char'
g++ -c -g3 -Wall -DNOCRYPT space2.c
g++ -c -g3 -Wall -DNOCRYPT bounty.c
g++ -c -g3 -Wall -DNOCRYPT swskills.c
g++ -c -g3 -Wall -DNOCRYPT alias.c
g++ -c -g3 -Wall -DNOCRYPT grub.c
g++ -c -g3 -Wall -DNOCRYPT mapper.c
g++ -c -g3 -Wall -DNOCRYPT templateparse.c
g++ -c -g3 -Wall -DNOCRYPT trivia.c
rm -f swrip
g++ -lcrypt -lz -o swrip act_comm.o act_info.o act_move.o act_obj.o act_wiz.o b
oards.o build.o clans.o comm.o comments.o const.o db.o fight.o handler.o hashstr
.o id.o interp.o magic.o makeobjs.o misc.o mud_comm.o mud_prog.o krearena.o play
er.o requests.o reset.o save.o shops.o skills.o special.o tables.o track.o updat
e.o space.o space2.o bounty.o swskills.o alias.o grub.o mapper.o templateparse.o
trivia.o -lm
chmod g+w swrip
chmod g+w act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o build.o
clans.o comm.o comments.o const.o db.o fight.o handler.o hashstr.o id.o interp.o
magic.o makeobjs.o misc.o mud_comm.o mud_prog.o krearena.o player.o requests.o
reset.o save.o shops.o skills.o special.o tables.o track.o update.o space.o spac
e2.o bounty.o swskills.o alias.o grub.o mapper.o templateparse.o trivia.o
make[1]: Leaving directory `/home/Owner/swrip200_modified/src'
mv swrip ../bin/swrip
$
There were a couple of warnings, but it worked OK.
Your deflate and other errors must be caused by your not installing the zlib library when you installed Cygwin, although you say you did that. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Phobos
(79 posts) Bio
|
Date
| Reply #49 on Wed 31 Oct 2007 11:34 PM (UTC) |
Message
| I did not in the beginning thought zlib is installed now and i have make clean and maid then the messages left after everyones help is this...
/cygdrive/c/phobos/swrip200/src/act_info.c:3393: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/act_info.c:3410: undefined reference to `_crypt'
act_wiz.o: In function `_Z16do_form_passwordP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/act_wiz.c:4973: undefined reference to `_crypt'
build.o: In function `_Z7do_msetP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/build.c:1656: undefined reference to `_crypt'
comm.o: In function `_Z19write_to_descriptoriPci':
/cygdrive/c/phobos/swrip200/src/comm.c:1462: undefined reference to `_deflate'
comm.o: In function `_Z5nannyP15descriptor_dataPc':
/cygdrive/c/phobos/swrip200/src/comm.c:1732: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/comm.c:1821: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/comm.c:1842: undefined reference to `_crypt'
comm.o: In function `_Z13compressStartP15descriptor_datah':
/cygdrive/c/phobos/swrip200/src/comm.c:3837: undefined reference to `_deflateIni
t_'
comm.o: In function `_Z11compressEndP15descriptor_data':
/cygdrive/c/phobos/swrip200/src/comm.c:3869: undefined reference to `_deflate'
/cygdrive/c/phobos/swrip200/src/comm.c:3875: undefined reference to `_deflateEnd
'
misc.o: In function `_Z10do_suicideP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/misc.c:3000: undefined reference to `_crypt'
collect2: ld returned 1 exit status
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/cygdrive/c/phobos/swrip200/src'
make: *** [all] Error 2
so im not sure where to go from here everyones asked me the same questions over and over and i have posted several time what i have done and i am not trying to sound like im not appreshiating what everyone is doing for me but i have been told to not post things over and over even in a topic so if theres confusion on what i have done please read over the whole topic i know theres 4 pages but most of it is repeditive so it wont take long that way we can try to move forword. | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #50 on Wed 31 Oct 2007 11:43 PM (UTC) |
Message
| When you do "make clean" followed by "make" do you see this? ...
$ make
make swrip
make[1]: Entering directory `/home/Owner/swrip200_modified/src'
g++ -c -g3 -Wall -DNOCRYPT act_comm.c
g++ -c -g3 -Wall -DNOCRYPT act_info.c
g++ -c -g3 -Wall -DNOCRYPT act_move.c
g++ -c -g3 -Wall -DNOCRYPT act_obj.c
g++ -c -g3 -Wall -DNOCRYPT act_wiz.c
... and so on.
That is, is the -DNOCRYPT there? If so, you should not be getting the crypt errors. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #51 on Wed 31 Oct 2007 11:45 PM (UTC) |
Message
| I see from your earlier post:
make[1]: Entering directory `/cygdrive/c/Phobos/swrip200/src'
g++ -c -g3 -Wall -DNCRYPT -DMCCP space2.c
g++ -c -g3 -Wall -DNCRYPT -DMCCP bounty.c
g++ -c -g3 -Wall -DNCRYPT -DMCCP swskills.c
There is a big difference between NCRYPT and NOCRYPT, check your spelling. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #52 on Wed 31 Oct 2007 11:57 PM (UTC) |
Message
| I can reproduce your problem if I turn MCCP support on, and am investigating this. Meanwhile, for a clean compile, disable MCCP, by editing the Makefile:
#Uncomment the next line if you want MCCP support
#DBUGFLG = -DMCCP <--- comment out MCCP support
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #53 on Thu 01 Nov 2007 12:03 AM (UTC) |
Message
| I see a comment of mine made in 2002 "For some reason we have yet to establish, MCCP doesn't work under Cygwin":
http://www.gammon.com.au/forum/?id=813
So, for the time being, try living without MCCP. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Phobos
(79 posts) Bio
|
Date
| Reply #54 on Thu 01 Nov 2007 12:29 AM (UTC) |
Message
| Ok i have changed the makefile so its
#DBUGFLG = -DMCCP
if thats what you mean it didnt work if thats not what you meant what do you want me to change? | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #55 on Thu 01 Nov 2007 01:02 AM (UTC) Amended on Thu 01 Nov 2007 01:23 AM (UTC) by Nick Gammon
|
Message
| Did you do a make clean? Can you show me the compiler output please - all of it.
[EDIT]
Quote:
... if thats what you mean it didnt work ...
I meant that, but after changing the Makefile you need to "make clean". |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #56 on Thu 01 Nov 2007 01:07 AM (UTC) |
Message
| Nick posted a list of changes to make; try getting a fresh copy and then apply exactly the changes he lists. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #57 on Thu 01 Nov 2007 01:20 AM (UTC) |
Message
| Well I worked it out, this is a bit strange. Change two lines in the Makefile:
Change:
to remove the -lz, like this:
And add -lz to the end of the line that links. That is, change:
gcc $(L_FLAGS) -o swrip $(O_FILES) -lm
to read:
gcc $(L_FLAGS) -o swrip $(O_FILES) -lm -lz
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Phobos
(79 posts) Bio
|
Date
| Reply #58 on Thu 01 Nov 2007 01:49 AM (UTC) |
Message
| L_FLAGS = $(PROF) -lcrypt -lz
is what i have i took out the -lcrypt -lz
and im left with
L_FLAGS = $(PROF)
The second change gcc $(L_FLAGS) -o swrip $(O_FILES) -lm
i could not find this line in the makefile so im not sure what you would like me to do about that but i changed the first one | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #59 on Thu 01 Nov 2007 02:13 AM (UTC) |
Message
| Can you copy and paste your Makefile then please? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
233,488 views.
This is page 4, subject is 6 pages long:
1
2
3
4 5
6
It is now over 60 days since the last post. This thread is closed.
Refresh page
top