Help compiling SWR

Posted by Dolph on Fri 17 Jan 2003 05:27 AM — 10 posts, 31,815 views.

#0
I am trying to compile SWR with Cygwin with very little success.

I've tried using the code I got from: http://ftpgame.org/cgi-bin/directory?/pub/smaug/swr

When I type make this comes up:

$ make
make swreality
make[1]: Entering directory `C:/cygwin/src'
gcc -c -g3 -Wall act_comm.c
process_begin: CreateProcess((null), gcc -c -g3 -Wall act_comm.c, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [act_comm.o] Error 2
make[1]: Leaving directory `C:/cygwin/src'
C:\cygwin\bin\make.exe: *** [all] Error 2

I have also tried to use the code downloaded from this site however it doesn't have a make file so was wondering how to make the make file or where to get one that will work with this, or how to fix the above code, whichever will be quicker and easier.

Any help will be greatly appreciated, thank you.
Amended on Tue 20 Nov 2007 04:22 AM by Nick Gammon
USA #1
The file you downloaded (via the link you provided) was the Win32 source (as I *believe* the swr source on this site is as well), I would assume that it would not work under Cygwin. You need to download a copy of the *nix based source.
#2
Really...well can you suggest what compiler I can use to compile it or where I can get the *.nix version?
USA #3
Best bet is MSVC and it wont matter which version you get for the most part.
#4
Unfortunately I do not have MSVC nor do I have the money to buy it so can anyone suggest a free compiler that will work and where to get it?

If not I would still like to know where to get the *nix version.
USA #5
I've heard of many Cygwin users haveing very little problems with this copy of SWR:

http://www.geocities.com/gendi_uk/download.html
#6
Heh, now that I think about it, I think thats where I got the code in the first place, not the other site.

But at any rate I tried all of the code from that site and came up with the same errors, though came up with a slightly different one for SWRIP:

$ make
make swrip
make[1]: Entering directory `C:/cygwin/src'
gcc -c -g3 -Wall -DREQUESTS act_comm.c
process_begin: CreateProcess((null), gcc -c -g3 -Wall -DREQUESTS act_comm.c, ...
) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [act_comm.o] Error 2
make[1]: Leaving directory `C:/cygwin/src'
C:\cygwin\bin\make.exe: *** [all] Error 2
USA #7
I see a remarkable trend here. The thing taht catches my eye is: "c:\cygwin\src\" that shouldn't be. Describe the process you are using to extract the files you download. By no means should /src end up in your cygwin root.
#8
Well I download the file then use Winzip to to extract just the files that are in the \src directory and put them in a folder in the Cygwin root...I did not know you were not supposed to do that and didn't think it mattered much. I should also probabily point out that I'm not a programmer or anything so didn't know this.
Australia Forum Administrator #9
If I may make a gentle suggestion, a MUD server is one of the more complex pieces of code you can compile. If you are not familiar with the compilation process itself, try getting started with a simple program like the classic "hello world" ones described in most C books. This will iron out basic issues, like do you have Cygwin installed correctly.

After installing Cygwin you should have a "home" directory where you put your stuff. I don't have my Windows PC with me right now, but in my case it would be something like:

c:\cygwin\home\nick

Then you would unzip the SWR files into that, giving:

c:\cygwin\home\nick\swr-1.2.3.4

Inside that directory would be a src directory. Navigate to that and type 'make'.

There are quite a few posts here from people who have had trouble getting Cygwin to work, usually because they didn't install enough of it. Try seaching the forum for "cygwin" and see what you find.