Cygwin
Posted by Shadoan
on Tue 27 Mar 2001 06:55 PM
— 15 posts, 55,932 views.
Can you tell me exactly how to compile SMAUG with cygwin because whenever I try running it it says: Bad command or filename.
Thx
Well, what do you type in? And what directory are you in when you do it?
I am in C:\cygwin and I click on the cygwin.bat file, a DOS window opens up prints Bad command or filename and closes.
P.S Thx for the SWR help but I don't understand still, do I replace the smaug.exe file with the StarwarsSmaug.exe file?
It is hard to answer your first question without knowing more details.
I would open a DOS window, change to the Cygwin directory, and try it from there. That way the window does not disappear.
In any case, I would have expected you to unzip the source files, change to the appropriate directory, and type "make".
Quote:
Do I replace the smaug.exe file with the StarwarsSmaug.exe file?
You can do that, or just run the StarwarsSmaug.exe file.
i think the problem he is having Nick is opening
cygwin... to compile the mud first, but like what you
say doing that .exe will run it automatically...
there is a cygwin.bat file located here unless you
changed stuff when you installed cygwin...
click start, click programs, click on cygnus solutions,
then click on cygnus bash shell...
that'll get you into the cygwin, unless there was a mess
up in the .bat file itself.
ThankyouThankyouThankyou Mr. Hate :)
IT WORKS, YAY!
Ok if i just run the StarWarsSmaug.exe file in the SMAUG directory it'll just give me about 500 Fread errors then it wont recognize the races then it will close on loading teh areas....
ditto... think there is more than just running that
file, but with a regular non-windows coding of SWR
i got a little less... check the other message section
i've been posting in for a possible solution from
the man, Nick...
seems to me like another makefile deal or just placing
the files wrong...
Ok, ok. Now I do all the changes nick said to the smaug .c files and try to 'make' it with cygwin then some error about regex.h in act_comm.c so I whip out my weapon, the allpowerful <<<NOTEPAD>>> :) and delete everything that has to do with regex.h. Then I try 'make' again and it works, but I get lots of warnings and it has no .exe file in src for me to run form AREA so I try 'make' again and this is what it gives me:
$ make
make smaug
make[1]: Entering directory `/home/hp authorized customer/smaug/dist/src
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG interp.c
interp.c: In function `interpret':
interp.c:757: warning: int format, long int arg (arg 7)
interp.c:757: warning: int format, long int arg (arg 8)
interp.c: In function `update_userec':
interp.c:1191: warning: implicit declaration of function `timerisset'
interp.c:1192: warning: implicit declaration of function `timercmp'
interp.c:1192: parse error before `<'
interp.c: At top level:
interp.c:1197: parse error before `if'
make[1]: *** [interp.o] Error 1
make[1]: Leaving directory `/home/hp authorized customer/smaug/dist/src'
make: *** [all] Error 2
Soooooo....help me :P
<<<MLS>>> (My Life Sucks)
There are discussions about the "timer" error messages in this other thread:
compiling under Cygnus.
Heh ok I'm pretty sure this isn't anywhere else :P
Now I got a new error it said this:
$ make
make smaug
make[1]: Entering directory `/home/hp authorized customer/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_comm.c
rm -f smaug
gcc -o smaug 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 deity.o fight.o handler.o hashstr
.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o mud_com
m.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o skills.o s
pecial.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o planes.o i
mm_host.o colorize.o
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-1/../../../../i686-pc-cygwin/bin/ld: cann
ot find -luser32
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/hp authorized customer/smaug/dist/src'
make: *** [all] Error 2
Sounds like some problem with user32, whatever that is.
Better post the contents of your Makefile.
I've been having this problem off and on. When I start up Cygwin, it gives the the error message "Cannot find /tmp; Please Create!".... yet the tmp directory is right there! If it wants in under the c:\ root dir, then that won't work, 'cause it's a read-only dir that I can't mess with. However, after I would re-install cygwin (takes like 10 minutes from local dir), it would work just fine! Now, however, it won't work even after I re-install it.... is there a.... simpler.... compiler program I can use? Or is there a way to get this Cygwin thing to work? When it gives me this error message, most of the commands (even simple ones like ls) won't work. Make also won't work when this happens.... Am I making any sense to you guys, 'cause I know I'm not making any sense to myself....
I would presume it means the /tmp directory under the c:/cygwin directory.
However I don't know why it would not exist.
Try changing to the root directory (under Cygwin) and do:
ls -l
You should see something like this:
drwxr-xr-x 5 nick None 81920 Mar 13 08:24 bin
-rwxr-xr-x 1 nick None 55 Mar 13 08:24 cygwin.bat
-rw-r--r-- 1 nick None 766 Mar 13 08:24 cygwin.ico
drwxr-xr-x 5 nick None 4096 Mar 13 08:24 etc
drwxr-xr-x 3 nick None 0 Mar 13 08:29 home
drwxr-xr-x 8 nick None 0 Mar 13 08:24 lib
drwxr-xr-x 2 nick None 0 Mar 13 08:23 sbin
-rw-r--r-- 1 nick None 3558 Mar 13 08:24 setup.log
-rw-r--r-- 1 nick None 630806 Mar 13 08:24 setup.log.full
drwxr-xr-x 2 nick None 0 Mar 13 08:18 tmp
drwxr-xr-x 17 nick None 4096 Mar 13 08:23 usr
drwxr-xr-x 4 nick None 0 Mar 13 08:18 var
If the permissions on the tmp directory are different from the above, then that might explain why it doesn't work.
It isn't under C:\Cygwin
The root is read-only. I therefore put it in the only directory that isn't write protected, and I use that directory as my root for everything else (i.e. zmud, my smaug directory, cygwin, everything).
That's C:\Program Files\Microsoft Office\
And how would I go about changing the root directory under Cygwin? ls -l wouldn't work either; whenever I try to do that or pretty much any other command, it returns "Command not found."
If there's something about the root being write-protected that prevents me from fixing this (even though Cygwin used to work off and on, but now it won't at all), then is there some sort of simpler compiler program I can use? Something simple like DJGPP or Borland, but with instructions on how to compile SMAUG with it as you provided with Cygwin? I dunno but most of my efforts are put to a dead halt until I can get this to work one way or another.....
This sounds strange. I gather you are using NT, because Win 95/98 does not have directory protection like that.
You installed Cygwin under C:\Program Files\Microsoft Office\ , right? So it is really:
C:\Program Files\Microsoft Office\Cygwin
Then there should be a tmp there, ie.
C:\Program Files\Microsoft Office\Cygwin\tmp
If you can write to that directory then I don't see why you can't create a tmp directory too.
As for a simpler compiler, I think you are running out of options. Microsoft Visual C++ might be simpler, but it isn't free. Similarly for Borland, you can download their old C compilers but I strongly doubt they will support Windows compiles (eg. TCP/IP and so on).