[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  swr 2.0 compile cygwin

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: swr 2.0 compile cygwin
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Mon 29 Oct 2007 04:37 AM (UTC)  quote  ]

Amended on Mon 29 Oct 2007 04:38 AM (UTC) by Zeno

Message
Please copy-paste error messages, not just retyping them.

And once again, use search.
http://www.gammon.com.au/forum/bbshowpost.php?id=7445

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Phobos   (79 posts)  [Biography] bio
Date Mon 29 Oct 2007 04:36 AM (UTC)  quote  ]
Message
Ok that got ride of some of it but not i get a new message...

act_move.c: In function 'ROOM_INDEX_DATA* generate_exit<ROOM_INDEX_DATA*, EXIT_DATA**>':
act_move.c:604: erro: ISO C++ forbids cast to non-reference type used as lvalue

make[1]: *** [act_move.o] Error 1
make[1]: Leaving directory '/cygdrive/c/Phobos/swrip200/src'
make: *** [all] Error 2

thank you for helping with the crypt and would be greatfull if you can help with the message here also
[Go to top] top

Posted by GuidoHC   (10 posts)  [Biography] bio
Date Tue 21 Aug 2007 04:27 AM (UTC)  quote  ]
Message
Nevermind, I had to get the right Makefil, I had an old version of the server, also, and was using two folders, haha. Sorry for the false alarm.
[Go to top] top

Posted by GuidoHC   (10 posts)  [Biography] bio
Date Tue 21 Aug 2007 03:56 AM (UTC)  quote  ]
Message
I get the same Error, even after uncommenting the Cygwin and Crypt lines. Here is my Makefile. I also don't have crypt.h anywhere on my computer. It'd be great to know where I can get it, and where it needs to be placed.


CC = g++
#PROF = -p
NOCRYPT =

# -E Preprocess only; do not compile, assemble or link
# -S Compile only; do not assemble or link
# -c Compile and assemble, but do not link
# -x Specify language of input files c++ or c
EXTRAFLG =

#Uncomment to compile in Cygwin
CYGWIN = -DCYGWIN

#Uncomment the line below if you are getting undefined crypt errors
NEED_CRYPT = -lcrypt

#Uncomment the line below if you are getting warnings about undefined math functions
#NEED_MATH = -lm

W_FLAGS = -Wall -pedantic -Werror -Wformat-security -Wshadow -Wpointer-arith -Wcast-align -Wredundant-decls

C_FLAGS = -g3 $(W_FLAGS) $(PROF) $(NOCRYPT) $(DBUGFLG) $(EXTRAFLG)
L_FLAGS = $(PROF) $(NEED_CRYPT) $(NEED_MATH) -lz

#Intermud-3 - Comment out to disable I3 support in your code
#I3 = 1

#IMC2 - Comment out to disable IMC2 support
IMC = 1


C_FILES = $(wildcard *.c)

ifdef I3
C_FLAGS := $(C_FLAGS) -DI3 -DI3SMAUG
endif

ifdef IMC
C_FLAGS := $(C_FLAGS) -DIMC -DIMCSMAUG
endif

O_FILES := $(patsubst %.c,o/%.o,$(C_FILES))

H_FILES = $(wildcard *.h)

all:
$(MAKE) -s swr

ifdef CYGWIN
swr: $(O_FILES)
rm -f swr.exe
$(CC) -o swr.exe $(O_FILES) $(L_FLAGS)
echo "Done compiling mud.";
chmod g+w swr.exe
chmod a+x swr.exe
chmod g+w $(O_FILES)
#mv swr.exe ../bin/swr
else
swr: $(O_FILES)
rm -f swr
$(CC) -o swr $(O_FILES) $(L_FLAGS)
echo "Done compiling mud.";
chmod g+w swr
chmod g+w $(O_FILES)
#mv swr ../bin/swr
endif

.c.o: mud.h
$(CC) -c $(C_FLAGS) $<

clean:
rm -f $(O_FILES) ./swr ./swr.exe

o/%.o: %.c
echo " Compiling $@....";
$(CC) -c $(C_FLAGS) $< -o $@
[Go to top] top

Posted by Ghsthntr   USA  (10 posts)  [Biography] bio
Date Wed 28 Dec 2005 01:56 PM (UTC)  quote  ]
Message
ok thanks that helped i got a clean make.
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Wed 28 Dec 2005 12:13 AM (UTC)  quote  ]
Message
Quote:
act_info.c:2551: error: `crypt' undeclared (first use this function)


This means act_info.c has not seen a definition for what "crypt" means. Any file which produces this error needs:


#include <crypt.h>


at the top with the other includes when using Cygwin. This gets you the declaration for the crypt function.

Secondly you need to remove the # from in front of:
#NEED_CRYPT = -lcrypt


That will allow the compiler to link the crypt library once you're done. This requires that you have the crypt library package installed from Cygwin.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Tue 27 Dec 2005 08:18 PM (UTC)  quote  ]
Message
You shouldn't be. Try a make clean. Are you using SWRFUSS? If not, I suggest you should.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Ghsthntr   USA  (10 posts)  [Biography] bio
Date Tue 27 Dec 2005 08:05 PM (UTC)  quote  ]
Message
ok i removed the # and im still getting the same error.
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Tue 27 Dec 2005 07:18 PM (UTC)  quote  ]
Message
This line:
#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -lcrypt

Remove the # in the second line.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Ghsthntr   USA  (10 posts)  [Biography] bio
Date Tue 27 Dec 2005 07:01 PM (UTC)  quote  ]
Message
well i check the makefile and made the change's im still getting the:

$ make
make -s swr
Compiling o/act_comm.o....
Compiling o/act_info.o....
act_info.c: In function `void do_password(CHAR_DATA*, char*)':
act_info.c:2551: error: `crypt' undeclared (first use this function)
act_info.c:2551: error: (Each undeclared identifier is reported only once for ea
ch function it appears in.)
make[1]: *** [o/act_info.o] Error 1
make: *** [all] Error 2

my makefile is:

CC = g++
#PROF = -p
NOCRYPT =

# -E Preprocess only; do not compile, assemble or link
# -S Compile only; do not assemble or link
# -c Compile and assemble, but do not link
# -x Specify language of input files c++ or c
EXTRAFLG =

#Uncomment to compile in Cygwin
CYGWIN = -DCYGWIN

#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -lcrypt

#Uncomment the line below if you are getting warnings about undefined math functions
#NEED_MATH = -lm

W_FLAGS = -Wall -pedantic -Werror -Wformat-security -Wshadow -Wpointer-arith -Wcast-align -Wredundant-decls

C_FLAGS = -g3 $(W_FLAGS) $(PROF) $(NOCRYPT) $(DBUGFLG) $(EXTRAFLG)
L_FLAGS = $(PROF) $(NEED_CRYPT) $(NEED_MATH) -lz

#Intermud-3 - Comment out to disable I3 support in your code
#I3 = 1

#IMC2 - Comment out to disable IMC2 support
IMC = 1


C_FILES = $(wildcard *.c)

ifdef I3
C_FLAGS := $(C_FLAGS) -DI3 -DI3SMAUG
endif

ifdef IMC
C_FLAGS := $(C_FLAGS) -DIMC -DIMCSMAUG
endif

O_FILES := $(patsubst %.c,o/%.o,$(C_FILES))

H_FILES = $(wildcard *.h)

all:
$(MAKE) -s swr

ifdef CYGWIN
swr: $(O_FILES)
rm -f swr.exe
$(CC) -o swr.exe $(O_FILES) $(L_FLAGS)
echo "Done compiling mud.";
chmod g+w swr.exe
chmod a+x swr.exe
chmod g+w $(O_FILES)
#mv swr.exe ../bin/swr
else
swr: $(O_FILES)
rm -f swr
$(CC) -o swr $(O_FILES) $(L_FLAGS)
echo "Done compiling mud.";
chmod g+w swr
chmod g+w $(O_FILES)
#mv swr ../bin/swr
endif

.c.o: mud.h
$(CC) -c $(C_FLAGS) $<

clean:
rm -f $(O_FILES) ./swr ./swr.exe

o/%.o: %.c
echo " Compiling $@....";
$(CC) -c $(C_FLAGS) $< -o $@
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Tue 27 Dec 2005 06:22 PM (UTC)  quote  ]
Message
There should be some flag in the Makefile where you uncomment it to disable crypt.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Ghsthntr   USA  (10 posts)  [Biography] bio
Date Tue 27 Dec 2005 06:18 PM (UTC)  quote  ]
Message
ok im having a bit of trouble. I edited the makefile to be able to use cygwin. Im running off a winxp notebook. i keep getting this:

$ make
make -s swr
Compiling o/act_comm.o....
Compiling o/act_info.o....
act_info.c: In function `void do_password(CHAR_DATA*, char*)':
act_info.c:2551: error: `crypt' undeclared (first use this function)
act_info.c:2551: error: (Each undeclared identifier is reported only once for ea
ch function it appears in.)
make[1]: *** [o/act_info.o] Error 1
make: *** [all] Error 2

:Please help
[Go to top] 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.


4,220 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]