20 Sep, 2008, Igabod wrote in the 1st comment:
Votes: 0
ok so i'm tinkering around with the low4 codebase i downloaded from the repository here and in my makefile it tells me this:

comm.c:169: error: conflicting types for 'gettimeofday'
/usr/include/sys/time.h:73: error: previous declaration of 'gettimeofday' was here

i freely admit i've gotten rusty on the coding front and would appreciate it if somebody could tell me what this means and how to fix it.
20 Sep, 2008, Davion wrote in the 2nd comment:
Votes: 0
Go to line 169 of comm.c, it's most likely a prototype for the function. Safe enough to just remove it.
20 Sep, 2008, Igabod wrote in the 3rd comment:
Votes: 0
thanks, that fixed it. i will most likely be asking a bunch of stupid questions like this one in the future so please bear with me while i relearn the trade.
20 Sep, 2008, Igabod wrote in the 4th comment:
Votes: 0
oh yeah, and before i forget, what do i need to do to get cygwin to recognize the startup command?

[Edit to add something]

yay i got it to compile mostly but right at the end it pops up with act_info.c:3677: undefined reference to "_crypt"
as well as the same in a couple other locations. what would i need to do to correct this? i'm sure it's something simple but i never took any C or C++ classes, taught myself how to code, so any help is appreciated.
20 Sep, 2008, Chris Bailey wrote in the 5th comment:
Votes: 0
Have you tried adding -lcrypt to your makefile?
20 Sep, 2008, Davion wrote in the 6th comment:
Votes: 0
If adding -lcrypt to the makefile doesn't work, it may be because cygwin lacks the crypt lib. In which case, I'm pretty sure adding -DNOCRYPT to the makefile fixes that.
20 Sep, 2008, Chris Bailey wrote in the 7th comment:
Votes: 0
Oh yeah I forgot he was using cygwin. Isn't it somehow incapable of using the crypt lib?
20 Sep, 2008, Davion wrote in the 8th comment:
Votes: 0
I can't remember. It's either it can't use it, or it doesn't come with it installed. -DNOCRYPT basically removes encrypting (or atleast it does in ROM!)
20 Sep, 2008, Tijer wrote in the 9th comment:
Votes: 0
I think you can just copy the define for crypt in merc.h without any o.s. checks and it should work.

As i seem to remember having similar issues when i went back to work on LoW4 (to make it less buggy :P)
21 Sep, 2008, Igabod wrote in the 10th comment:
Votes: 0
the 3rd line of my makefile is NOCRYPT = (blank here) then the next line is
C_FLAGS = -O -Wall -g -ggdb2 -Dlinux $(PROF) $(NOCRYPT)

most of the things in the makefile are gibberish to me so if it still needs something added to it then i am unsure where to add it. i don't seem to remember having this much trouble years ago when i tried to start a mud up but i guess thats the price you pay for dropping out of the world completely for so long.
21 Sep, 2008, Chris Bailey wrote in the 11th comment:
Votes: 0
If you think this is trouble just wait until you actually have to modify something. I think your best bet would be to grab a book on programming in C or C++ and check out some online tutorials. Personally I recommend This book. You might also want to check into a unix guide like this one.
21 Sep, 2008, Igabod wrote in the 12th comment:
Votes: 0
i've already made dozens of modifications, i'm able to do that without any problems for the most part, i just haven't been able to translate the makefile before cause i rarely need to alter it. i just need to figure out what this one problem is and i'll be able to fix it if i encounter it again in the future. thats how i learn, i encounter problems, try to figure it out on my own, if i'm unable to then i ask for assistance. when assistance is recieved, i fix the problem and then know it better if i were to read some book. thats just the way my brain works. btw i'm not trying to be a great coder or anything just yet, i'm just doing this for fun, i'm not even going to put this online.

[Edit] by modifications i mean small things, i've made a few new skills and tweaked numbers here and there but nothing major like rewriting the fight system or anything.
21 Sep, 2008, Igabod wrote in the 13th comment:
Votes: 0
cygwin does have the crypt lib by the way, and i do have it installed but i'm still getting the same message. if somebody could tell me where in the makefile i'm supposed to put -DNOCRYPT or -lcrypt then that would be great. thanks.
21 Sep, 2008, Chris Bailey wrote in the 14th comment:
Votes: 0
Pastebin the makefile.
21 Sep, 2008, Igabod wrote in the 15th comment:
Votes: 0
CC      = gcc
PROF =
NOCRYPT =
C_FLAGS = -O -Wall -g -ggdb3 -Dlinux $(PROF) $(NOCRYPT)
L_FLAGS = -O $(PROF)

IMC_OFILES = ice.o imc-events.o imc-interp.o imc-util.o icec-mercbase.o \
imc-mail.o imc-version.o imc-config.o imc-mercbase.o imc.o icec.o


O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o comm.o const.o \
db.o fight.o handler.o interp.o magic.o save.o special.o update.o \
kav_info.o kav_fight.o kav_wiz.o clan.o mage.o rot_wiz.o \
demon.o wizutil.o low_act.o dempowers.o drow.o vamp.o warlock.o\
leader.o arena.o config.o ninja.o monk.o monk2.o \
monk3.o garou.o olc.o string.o bit.o board.o bounty.o \
kingdom.o clan_list.o low_wiz.o low_misc.o $(IMC_OFILES)
low: $(O_FILES)
rm -f merc
$(CC) $(L_FLAGS) -o merc $(O_FILES)

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

is this what you mean by pastebin? i've never heard anybody use that term before so i was unsure.
21 Sep, 2008, Chris Bailey wrote in the 16th comment:
Votes: 0
Append -lcrypt to line 6 (L_FLAGS)


Edit to add a PS.

PS. Look at the navigation controls up top, Pastebin is next to MUD List and it's coool =)
21 Sep, 2008, Igabod wrote in the 17th comment:
Votes: 0
Chris Bailey said:
Append -lcrypt to line 6 (L_FLAGS)


Edit to add a PS.

PS. Look at the navigation controls up top, Pastebin is next to MUD List and it's coool =)

ah ok thanks for the help i really do appreciate it. and now i feel a little bit stupid for not knowing about the pastebin but i've never used it before.

[edit to add this update]
Just now put -lcrypt on line 6 and i still get the same message when i do a make.

just to be sure i got it correct here's the first few lines of makefile.

CC      = gcc
PROF =
NOCRYPT =
C_FLAGS = -O -Wall -g -ggdb3 -Dlinux $(PROF) $(NOCRYPT)
L_FLAGS = -O $(PROF) -lcrypt
21 Sep, 2008, Chris Bailey wrote in the 18th comment:
Votes: 0
Np. Does that mean it is compiling for you now?
21 Sep, 2008, Igabod wrote in the 19th comment:
Votes: 0
heh i was editing while you were replying, answer to your question is above your last post
21 Sep, 2008, Chris Bailey wrote in the 20th comment:
Votes: 0
Ok try appending it to line 21. That would make it look like…(remove it from the other location)
$(CC) $(L_FLAGS) -o merc $(O_FILES) -lcrypt
0.0/27