Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Ghsthntr
USA (10 posts) 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
| top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #1 on 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 | top |
|
| Posted by |
Ghsthntr
USA (10 posts) bio
|
| Date |
Reply #2 on 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 $@
| top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #3 on 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 | top |
|
| Posted by |
Ghsthntr
USA (10 posts) bio
|
| Date |
Reply #4 on Tue 27 Dec 2005 08:05 PM (UTC) [ quote
] |
| Message |
| ok i removed the # and im still getting the same error. | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #5 on 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 | top |
|
| Posted by |
Samson
USA (683 posts) bio
|
| Date |
Reply #6 on 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:
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:
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 | top |
|
| Posted by |
Ghsthntr
USA (10 posts) bio
|
| Date |
Reply #7 on Wed 28 Dec 2005 01:56 PM (UTC) [ quote
] |
| Message |
| ok thanks that helped i got a clean make. | top |
|
| Posted by |
GuidoHC
(10 posts) bio
|
| Date |
Reply #8 on 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 $@
| top |
|
| Posted by |
GuidoHC
(10 posts) bio
|
| Date |
Reply #9 on 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. | top |
|
| Posted by |
Phobos
(79 posts) bio
|
| Date |
Reply #10 on 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 | top |
|
| Posted by |
Zeno
USA (2,867 posts) bio
Moderator |
| Date |
Reply #11 on Mon 29 Oct 2007 04:37 AM (UTC) [ quote
] Amended on Mon 29 Oct 2007 04:38 AM (UTC) by Zeno
|
| Message |
|
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,154 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )