Login
User Name:

Password:



Register

Forgot your password?
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
SWRFUSS 1.4
Author: Various
Submitted by: Samson
Users Online
AhrefsBot, Elwood

Members: 1
Guests: 43
Stats
Files
Topics
Posts
Members
Newest Member
488
3,789
19,632
596
Elwood

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SmaugFUSS » New to SmaugFuss (solved)
Forum Rules | Mark all | Recent Posts

New to SmaugFuss (solved)
< Newer Topic :: Older Topic > Problems with compiling and in-game

Pages:<< prev 1 next >>
Post is unread #1 Feb 21, 2021 7:28 am   
Go to the top of the page
Go to the bottom of the page

Zedethar
Fledgling
GroupMembers
Posts38
JoinedFeb 21, 2021

 
Greetings all!

Thanks for hearing me out as I am fairly new to this site. I played and built areas on muds many years ago and now I will return once again to test my skills.
I did run one with an smaugfuss1.9+executable file compiled already. It ran great but I ran into an issue of nothing RESETTING in any of the areas. I will try SMAUGfuss1.9.4 next so I have to ask.
Do I use CYGWIN to compile Smaugfuss 1.9.4 to a smaug.exe file? If so I have tried a few times but run into errors on Cygwin during it. Is there certain parts of cygwin I need to
install as well? So far I have installed GCC DEVEL related files and MAKE commands to Cygwin. I really want to compile 1.9.4 and try this out. Hopefully I can make resets work in the mud.

Thanks for any info!

Post is unread #2 Feb 21, 2021 8:26 am   
Go to the top of the page
Go to the bottom of the page

Matteo2303
Apprentice
GroupMembers
Posts86
JoinedAug 25, 2003

 
Hi,

check in src directory if...

CYGWIN = -DCYGWIN

...is uncomment in makefile.

Bye

Post is unread #3 Feb 21, 2021 9:20 am   Last edited Feb 21, 2021 9:51 am by Zedethar
Go to the top of the page
Go to the bottom of the page

Zedethar
Fledgling
GroupMembers
Posts38
JoinedFeb 21, 2021

 
In my SRC folder I edited Makefile and removed # to uncomment the CYGWIN.

When I type make in the SRC folder it starts with errors like below:

$ make
Makefile:105: warning: ignoring prerequisites on suffix rule definition
make -s smaug
Makefile:105: warning: ignoring prerequisites on suffix rule definition
Compiling o/imc.o....
In file included from mud.h:398,
from imc.c:59:
imc.c: In function ‘void imc_addname(char**, const char*)’:
imc.h:135:21: error: ‘strdup’ was not declared in this scope; did you mean ‘str_dup’?
135 | #define IMCSTRALLOC strdup
| ^~~~~~
imc.c:551:12: note: in expansion of macro ‘IMCSTRALLOC’
551 | *list = IMCSTRALLOC( newlist );
| ^~~~~~~~~~~
imc.c: In function ‘void imc_removename(char**, const char*)’:
imc.h:135:21: error: ‘strdup’ was not declared in this scope; did you mean ‘str_dup’?
135 | #define IMCSTRALLOC strdup
| ^~~~~~
imc.c:565:12: note: in expansion of macro ‘IMCSTRALLOC’
565 | *list = IMCSTRALLOC( newlist );
| ^~~~~~~~~~~
imc.c: In function ‘CHAR_DATA* imc_find_user(const char*)’:
imc.c:704:75: error: ‘strcasecmp’ was not declared in this scope; did you mean ‘str_cmp’?
704 | if( ( vch = d->character ? d->character : d->original ) != NULL && !strcasecmp( CH_IMCNAME( vch ), name )
| ^~~~~~~~~~
| str_cmp
imc.c: In function ‘char* imcgetname(const char*)’:
imc.c:719:9: error: ‘strcasecmp’ was not declared in this scope; d

also tried
$ make clean
Makefile:105: warning: ignoring prerequisites on suffix rule definition

Post is unread #4 Feb 21, 2021 8:04 pm   
Go to the top of the page
Go to the bottom of the page

Zedethar
Fledgling
GroupMembers
Posts38
JoinedFeb 21, 2021

 
After messing with the MAKEFILE I have gotten a bit further by disabling IMC. Heres where the error stops and also my MAKEFILE

$ make
Makefile:105: warning: ignoring prerequisites on suffix rule definition
make -s smaug
Makefile:105: warning: ignoring prerequisites on suffix rule definition
Compiling o/act_comm.o....
Compiling o/act_info.o....
Compiling o/act_move.o....
Compiling o/act_obj.o....
act_obj.c: In function ‘void do_rolldie(CHAR_DATA*, const char*)’:
act_obj.c:3327:36: error: ‘strdup’ was not declared in this scope; did you mean ‘str_dup’?
3327 | char *face_name_copy = strdup( face_name ); /* Since I want to tokenize without modifying the original string */
| ^~~~~~
| str_dup
make[1]: *** [Makefile:102: o/act_obj.o] Error 1
make: *** [Makefile:46: all] Error 2


MAKEFILE -------

CC = g++
#PROF = -p

#Uncomment to compile in Cygwin
CYGWIN = -DCYGWIN

#Uncomment the line below if you are getting undefined references to dlsym, dlopen, and dlclose.
#Comment it out if you get errors about ldl not being found.
NEED_DL = -ldl

#Some systems need this for dynamic linking to work.
EXPORT_SYMBOLS = -export-dynamic

# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket

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

W_FLAGS = -std=c++1z -Wall -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls

C_FLAGS = -g2 $(W_FLAGS) $(SOLARIS_FLAG) $(PROF) $(EXPORT_SYMBOLS)
L_FLAGS = $(PROF) $(SOLARIS_LINK) -lz $(NEED_DL)
#D_FLAGS : For the DNS Slave process. No need in linking all the extra libs for this.
D_FLAGS = -g2 -O $(PROF) $(SOLARIS_LINK)

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c ban.c boards.c \
build.c calendar.c chess.c clans.c color.c comm.c comments.c const.c db.c deity.c \
dns.c fight.c handler.c hashstr.c hint.c hotboot.c house.c imm_host.c interp.c \
liquids.c magic.c makeobjs.c mapout.c mapper.c mccp.c \
misc.c mpxset.c mssp.c mud_comm.c mud_prog.c news.c planes.c player.c polymorph.c \
renumber.c reset.c save.c services.c sha256.c shops.c skills.c special.c tables.c \
track.c update.c variables.c weather.c

ifdef IMC
C_FILES := imc.c $(C_FILES)
C_FLAGS := $(C_FLAGS) -DIMC -DIMCSMAUG
endif

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

H_FILES = $(wildcard *.h)

all:
$(MAKE) -s smaug
$(MAKE) -s dns

# pull in dependency info for *existing* .o files
-include dependencies.d

ifdef CYGWIN
smaug: $(O_FILES)
rm -f smaug.exe
dlltool --export-all --output-def smaug.def $(O_FILES)
dlltool --dllname smaug.exe --output-exp smaug.exp --def smaug.def
$(CC) -o smaug.exe $(O_FILES) smaug.exp $(L_FLAGS)
@echo "Generating dependency file ...";
@$(CC) -MM $(C_FLAGS) $(C_FILES) > dependencies.d
@perl -pi -e 's.^([a-z]).o/$$1.g' dependencies.d
@echo "Done compiling mud.";
chmod g+w smaug.exe
chmod a+x smaug.exe
chmod g+w $(O_FILES)

clean:
@rm -f o/*.o smaug.exe dependencies.d resolver.exe resolver.o *~

else
smaug: $(O_FILES)
rm -f smaug
$(CC) -export-dynamic -o smaug $(O_FILES) $(L_FLAGS)
@echo "Generating dependency file ...";
@$(CC) -MM $(C_FLAGS) $(C_FILES) > dependencies.d
@perl -pi -e 's.^([a-z]).o/$$1.g' dependencies.d
@echo "Done compiling mud.";
chmod g+w smaug
chmod a+x smaug
chmod g+w $(O_FILES)

clean:
@rm -f o/*.o smaug dependencies.d resolver resolver.o *~
endif

dns: resolver.o
rm -f resolver
$(CC) $(D_FLAGS) -o resolver resolver.o
@echo "Done compiling DNS resolver.";
chmod g+w resolver
chmod a+x resolver
chmod g+w resolver.o

indent:
indent -ts3 -nut -nsaf -nsai -nsaw -npcs -npsl -ncs -nbc -bls -prs -bap -cbi0 -cli3 -bli0 -l125 -lp -i3 -cdb -c1 -cd1 -sc -pmt $(C_FILES)
indent -ts3 -nut -nsaf -nsai -nsaw -npcs -npsl -ncs -nbc -bls -prs -bap -cbi0 -cli3 -bli0 -l125 -lp -i3 -cdb -c1 -cd1 -sc -pmt $(H_FILES)

indentclean:
rm *.c~ *.h~

o/%.o: %.c
echo " Compiling $@....";
$(CC) -c $(C_FLAGS) $< -o $@

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

Post is unread #5 Feb 21, 2021 10:15 pm   
Go to the top of the page
Go to the bottom of the page

Zedethar
Fledgling
GroupMembers
Posts38
JoinedFeb 21, 2021

 
I have finally compiled and got it to work. Thanks

Post is unread #6 Feb 23, 2021 5:39 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,914
JoinedJul 26, 2005

 
Nice, so what all changes did you make? It will help when new ones come around with the same problem or to get the fixes in so others don't have to deal with them :)

Post is unread #7 Feb 23, 2021 8:35 pm   Last edited Feb 23, 2021 8:38 pm by Zedethar
Go to the top of the page
Go to the bottom of the page

Zedethar
Fledgling
GroupMembers
Posts38
JoinedFeb 21, 2021

 
First and foremost I would like to say, I had no idea how to use Cygwin and it took me a bit of time to install every file that may be needed. That was a hassle for the first day or so. But I finally got it under control by getting
these related files for:

GCC
Make
C++
G++
I even installed most Devel related files to be safe. Its running really well now.

My 2nd trouble was with issues within the makefile of 1.9.4 in this line

W_FLAGS = -std=c++1z -Wall -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls
I had to remove -std=c++1z this to make the makefile complete all the way through and compile Smaug.exe
example:
W_FLAGS = -Wall -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls (mine looks like this)

Let me point out that -std=c++1z isnt in the 1.9.3 makefile so you don't have to even remove it!
I'm sure its necessary for some function and i'll find out later on and how to make it work then I'll try to put back in.

Of couse this line: uncommented by removing #
#CYGWIN = -DCYGWIN
example:
CYGWIN = -DCYGWIN

and Last this line: uncommented
#IMC = 1
example:
IMC = 1

Finally it compiled all the way through with hardly any errors!

:)
-----------------





Pages:<< prev 1 next >>