SWR Cygwin Compiling Problems

Posted by Nick Gammon on Sun 09 Dec 2001 05:25 AM — 14 posts, 46,866 views.

Australia Forum Administrator #0
Sounds like a problem in the file "makefile". If you can't spot it, upload the contents of it into a message here.
Australia Forum Administrator #1
That looks OK. I'm not sure why you are typing ./make, I would just type "make".
Australia Forum Administrator #2
However, "make" on its own should work. Typing "./make" is invoking some file called "make" in that directory. There should be a make program in the bin directory.

In my Cygwin there is a program:

/bin/make.exe

That should be what you are running.
Australia Forum Administrator #3
Sounds like you also forgot to put in gcc, the compiler.
Australia Forum Administrator #4
In my version of SWR SMAUG I commented out that line with no ill effect, ie. inside fight.c change the line:


#include <sys/dir.h>


to:


//#include <sys/dir.h>
Australia Forum Administrator #5
This line you mean?


extern FILE *fpArea;


You normally can't work around problems (successfully) just by deleting the lines that they occur in. In my earlier suggestion, however that was for an "include" file that didn't exist, and wasn't needed.

Make sure that this line is near the top (near the other "include" statements) ...


#include <stdio.h>


Australia Forum Administrator #6

Since you have said 'any MUD codebase', I describe how to compile SMAUG in the web page How to make changes, including compiling

This is not the SWR SMAUG, but the standard one. The source is available from my web page, and it compiled OK with Cygwin, as that was what I used when I went through to write the page.

Australia Forum Administrator #7
Try adding NOCRYPT to the makefile as suggested elsewhere in this forum. (Search for that word for more details).
Australia Forum Administrator #8
I don't have my cable modem right now, so uploading a big file is out of the question. Perhaps someone else can help?
Australia Forum Administrator #9
Someone else reported a segmentation fault in the linker a day ago. Perhaps it has a bug? Try the Cygwin site and search for any problems with the linker.
Australia Forum Administrator #10
I have found a clue, maybe you don't have enough memory. A web site I found reports that ld may fail with a segmentation fault if you are short of memory.

It doesn't happen to me, so I don't think the problem is with Cygwin or SMAUG itself.
#11
Could you please provide some help with the save.c file? I do have crypt.h and i included it so that shouldn't be the problem. However, i still get the same problem as Liltoflm. Please help.
Australia Forum Administrator #12
Did you follow the "how to compile" instructions elsewhere (one level up from here), and use the cygwin make file?

If you are referring to the message about:

`DIR' undeclared (first use in this function)


... this is nothing to do with crypt.h.
#13
Not sure how it works with the Cygwin,but the crypt insnt linked in the makefile,I tweaked over that for a while on my Linux box,but under where it says if you want debugging comment out this line and uncomment the rest..the uncommented line should have the flags -lm -lcrypt for a gcc compile,that will clear up the "undefined reference to crypt errors...

Ravyn