Please check out Realm of Shadows !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Linux Makefile Linking Problem Wed Sep 29, 2004 [11:19 AM]
Klered
Email not supplied
member since: Sep 25, 2001
Reply
Hi -

RH9 - Linux
GCC - compiling in the shell

Im having a problem linking:
Smaug 1.4a (customize over the past 4 years)
Original Distribution was a Nick Gammon port to Win32
(the code has numerous ifdef WIN32 statements, but still should compile -
might not be stable until removed...etc)
-I have checked lots or archives but still I can't find out the issue
RH9 - Linux
GCC - compiling in the shell

problem seems to be alot of undefined references - seems that mud.h

Here is my makefile - and the errors below .
Please Help??
__________________
CC = gcc
PROF =
NOCRYPT =
C_FLAGS = -g3 -Wall $(PROF) $(NOCRYPT)
L_FLAGS = $(PROF)
LIBS = -lcrypt
MAKE = make
# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket

#Uncomment the line below if compiling on a RedHat (and possibly other
Linux) box
LINUX = -DLINUX
# The program executable's name
PROG_NAME = smaug
#Uncomment the line below if you are getting implicit decleration of re_exec
REG = -DREGEX

#Uncomment the line below if you are getting undefined re_exec errors
NEED_REG = -lgnuregex
O_FILES = 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_comm.o mud_prog.o player.o
polymorph.o \
requests.o remort.o reset.o save.o shops.o skills.o special.o tables.o \
track.o update.o grub.o stat_obj.o ban.o services.o planes.o \
imm_host.o colorize.o

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c bank.c
boards.c \
build.c clans.c comm.c comments.c const.c db.c deity.c fight.c \
handler.c hashstr.c ibuild.c ident.c interp.c magic.c makeobjs.c \
mapout.c misc.c mpxset.c mud_comm.c mud_prog.c newarena.c
player.c polymorph.c \
requests.c remort.c reset.c save.c shops.c skills.c special.c tables.c \
track.c update.c grub.c stat_obj.c ban.c services.c planes.c \
imm_host.c colorize.c

H_FILES = mud.h bank.h bet.h imc-config.h imc-mercbase.h imc-mercdefs.h
imc.h \
ice.h icec.h icec-mercbase.h

all:
@echo ""
@echo " Checking Perished Lands History Record, Please wait... "
@$(MAKE) $(PROG_NAME)
@echo " ..done"

$(PROG_NAME): $(O_FILES)
@echo ""
@echo " Compiling Perished Lands MUD...Please wait "
@rm -f $(PROG_NAME)
@$(CC) $(L_FLAGS) -o $(PROG_NAME) $(O_FILES) $(LIBS)

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

clean:
@echo " performing a Make-Clean "
@rm -f *.o $(PROG_NAME) *~
@echo " ..done"
@echo


--------HERE IS THE RESULT -----
Compiling Perished Lands MUD...Please wait
act_wiz.o(.text+0x2399): In function `do_authorize':
/root/mudstuff/smaug/src/act_wiz.c:703: undefined reference to `do_quit'
act_wiz.o(.text+0x2e17): In function `do_deny':
/root/mudstuff/smaug/src/act_wiz.c:917: undefined reference to `do_quit'
act_wiz.o(.text+0x30a4): In function `do_fquit':
/root/mudstuff/smaug/src/act_wiz.c:992: undefined reference to `do_quit'
act_wiz.o(.text+0x1018f): In function `do_mortalize':
/root/mudstuff/smaug/src/act_wiz.c:5078: undefined reference to `do_quit'
act_wiz.o(.text+0x1076a):/root/mudstuff/smaug/src/act_wiz.c:5153:
undefined reference to `do_quit'
act_wiz.o(.text+0x10ac0):/root/mudstuff/smaug/src/act_wiz.c:5214: more
undefined references to `do_quit' follow
act_wiz.o(.text+0x22338): In function `do_doublexp':
/root/mudstuff/smaug/src/act_wiz.c:10667: undefined reference to
`sportschan'
act_wiz.o(.text+0x223d6):/root/mudstuff/smaug/src/act_wiz.c:10682:
undefined reference to `sportschan'
comm.o(.text+0x1a6): In function `main':
/root/mudstuff/smaug/src/comm.c:224: undefined reference to
`init_pfile_scan_time'
comm.o(.text+0x686e): In function `nanny':
/root/mudstuff/smaug/src/comm.c:2815: undefined reference to `scan_rent'
db.o(.text+0x1ee3): In function `boot_db':
/root/mudstuff/smaug/src/db.c:724: undefined reference to
`load_equipment_totals'
db.o(.text+0x1ee8):/root/mudstuff/smaug/src/db.c:725: undefined
reference to `scan_equipment'
db.o(.text+0x210b):/root/mudstuff/smaug/src/db.c:769: undefined
reference to `fread_questmaster'
fight.o(.text+0x98e1): In function `raw_kill':
/root/mudstuff/smaug/src/fight.c:3443: undefined reference to `sportschan'
fight.o(.text+0xc246): In function `do_kill':
/root/mudstuff/smaug/src/fight.c:4330: undefined reference to `sportschan'
fight.o(.text+0xc296):/root/mudstuff/smaug/src/fight.c:4338: undefined
reference to `sportschan'
remort.o(.text+0x2a9): In function `do_remort':
/root/mudstuff/smaug/src/remort.c:111: undefined reference to `do_quit'
save.o(.text+0x96f1): In function `load_vendors':
/root/mudstuff/smaug/src/save.c:2685: undefined reference to
`fread_vendor'
shops.o(.text+0x1e16): In function `do_buy':
/root/mudstuff/smaug/src/shops.c:689: undefined reference to
`save_vendor'
shops.o(.text+0x1e4c):/root/mudstuff/smaug/src/shops.c:696: undefined
reference to `save_vendor'
shops.o(.text+0x1e93):/root/mudstuff/smaug/src/shops.c:704: undefined
reference to `save_vendor'
shops.o(.text+0x22fc): In function `do_list':
/root/mudstuff/smaug/src/shops.c:866: undefined reference to
`save_vendor'
skills.o(.text+0x19cd0): In function `do_chickenout':
/root/mudstuff/smaug/src/skills.c:7631: undefined reference to
`sportschan'
tables.o(.text+0xf9b): In function `skill_function':
/root/mudstuff/smaug/src/tables.c:195: undefined reference to `do_aaccept'
tables.o(.text+0x104a):/root/mudstuff/smaug/src/tables.c:200: undefined
reference to `do_ahall'
tables.o(.text+0x113f):/root/mudstuff/smaug/src/tables.c:207: undefined
reference to `do_aquest'
tables.o(.text+0x1185):/root/mudstuff/smaug/src/tables.c:209: undefined
reference to `do_arena'
tables.o(.text+0x12c0):/root/mudstuff/smaug/src/tables.c:218: undefined
reference to `do_awho'
tables.o(.text+0x130a):/root/mudstuff/smaug/src/tables.c:222: undefined
reference to `do_buyvendor'
tables.o(.text+0x132d):/root/mudstuff/smaug/src/tables.c:223: undefined
reference to `do_buylocker'
tables.o(.text+0x1350):/root/mudstuff/smaug/src/tables.c:224: undefined
reference to `do_balance'
tables.o(.text+0x1517):/root/mudstuff/smaug/src/tables.c:237: undefined
reference to `do_bet'
tables.o(.text+0x1728):/root/mudstuff/smaug/src/tables.c:254: undefined
reference to `do_collectgold'
tables.o(.text+0x17fa):/root/mudstuff/smaug/src/tables.c:260: undefined
reference to `do_challenge'
tables.o(.text+0x1863):/root/mudstuff/smaug/src/tables.c:263: undefined
reference to `do_chaos'
tables.o(.text+0x1c18):/root/mudstuff/smaug/src/tables.c:292: undefined
reference to `do_deposit'
tables.o(.text+0x1c3b):/root/mudstuff/smaug/src/tables.c:293: undefined
reference to `do_decline'
tables.o(.text+0x23c8):/root/mudstuff/smaug/src/tables.c:352: undefined
reference to `do_forcemobfear'
tables.o(.text+0x23eb):/root/mudstuff/smaug/src/tables.c:353: undefined
reference to `do_forcemobhate'
tables.o(.text+0x2412):/root/mudstuff/smaug/src/tables.c:354: undefined
reference to `do_forcemobhunt'
tables.o(.text+0x2ca0):/root/mudstuff/smaug/src/tables.c:442: undefined
reference to `do_locker'
tables.o(.text+0x346f):/root/mudstuff/smaug/src/tables.c:505: undefined
reference to `do_mpfear'
tables.o(.text+0x3492):/root/mudstuff/smaug/src/tables.c:506: undefined
reference to `do_mphate'
tables.o(.text+0x34b5):/root/mudstuff/smaug/src/tables.c:507: undefined
reference to `do_mphunt'
tables.o(.text+0x3e72):/root/mudstuff/smaug/src/tables.c:584: undefined
reference to `do_offer'
tables.o(.text+0x3fb1):/root/mudstuff/smaug/src/tables.c:596: undefined
reference to `do_pfiles'
tables.o(.text+0x3fd4):/root/mudstuff/smaug/src/tables.c:598: undefined
reference to `do_pricevendor'
tables.o(.text+0x3ff7):/root/mudstuff/smaug/src/tables.c:599: undefined
reference to `do_placevendor'
tables.o(.text+0x43f2):/root/mudstuff/smaug/src/tables.c:630: undefined
reference to `do_quit'
tables.o(.text+0x4415):/root/mudstuff/smaug/src/tables.c:631: undefined
reference to `do_qstat'
tables.o(.text+0x443c):/root/mudstuff/smaug/src/tables.c:632: undefined
reference to `do_queststat'
tables.o(.text+0x471b):/root/mudstuff/smaug/src/tables.c:664: undefined
reference to `do_rent'
tables.o(.text+0x4b5c):/root/mudstuff/smaug/src/tables.c:719: undefined
reference to `do_shutvendor'
tables.o(.text+0x4d69):/root/mudstuff/smaug/src/tables.c:734: undefined
reference to `do_setquest'
tables.o(.text+0x5869):/root/mudstuff/smaug/src/tables.c:822: undefined
reference to `do_withdraw'
tables.o(.text+0x643a): In function `skill_name':
/root/mudstuff/smaug/src/tables.c:972: undefined reference to
`do_placevendor'
tables.o(.text+0x644f):/root/mudstuff/smaug/src/tables.c:973: undefined
reference to `do_shutvendor'
tables.o(.text+0x6464):/root/mudstuff/smaug/src/tables.c:974: undefined
reference to `do_collectgold'
tables.o(.text+0x6479):/root/mudstuff/smaug/src/tables.c:975: undefined
reference to `do_buyvendor'
tables.o(.text+0x648e):/root/mudstuff/smaug/src/tables.c:976: undefined
reference to `do_pricevendor'
tables.o(.text+0x64b5):/root/mudstuff/smaug/src/tables.c:979: undefined
reference to `do_aaccept'
tables.o(.text+0x651e):/root/mudstuff/smaug/src/tables.c:984: undefined
reference to `do_ahall'
tables.o(.text+0x65b1):/root/mudstuff/smaug/src/tables.c:991: undefined
reference to `do_aquest'
tables.o(.text+0x65db):/root/mudstuff/smaug/src/tables.c:993: undefined
reference to `do_arena'
tables.o(.text+0x6698):/root/mudstuff/smaug/src/tables.c:1002: undefined
reference to `do_awho'
tables.o(.text+0x6740):/root/mudstuff/smaug/src/tables.c:1010: undefined
reference to `do_balance'
tables.o(.text+0x6812):/root/mudstuff/smaug/src/tables.c:1020: undefined
reference to `do_bet'
tables.o(.text+0x694d):/root/mudstuff/smaug/src/tables.c:1035: undefined
reference to `do_buylocker'
tables.o(.text+0x69a1):/root/mudstuff/smaug/src/tables.c:1039: undefined
reference to `do_challenge'
tables.o(.text+0x69cb):/root/mudstuff/smaug/src/tables.c:1041: undefined
reference to `do_chaos'
tables.o(.text+0x6c17):/root/mudstuff/smaug/src/tables.c:1069: undefined
reference to `do_decline'
tables.o(.text+0x6caa):/root/mudstuff/smaug/src/tables.c:1076: undefined
reference to `do_deposit'
tables.o(.text+0x7046):/root/mudstuff/smaug/src/tables.c:1120: undefined
reference to `do_forcemobfear'
tables.o(.text+0x705b):/root/mudstuff/smaug/src/tables.c:1121: undefined
reference to `do_forcemobhate'
tables.o(.text+0x7070):/root/mudstuff/smaug/src/tables.c:1122: undefined
reference to `do_forcemobhunt'
tables.o(.text+0x7604):/root/mudstuff/smaug/src/tables.c:1198: undefined
reference to `do_locker'
tables.o(.text+0x7a9c):/root/mudstuff/smaug/src/tables.c:1257: undefined
reference to `do_mpfear'
tables.o(.text+0x7ab1):/root/mudstuff/smaug/src/tables.c:1258: undefined
reference to `do_mphate'
tables.o(.text+0x7ac6):/root/mudstuff/smaug/src/tables.c:1259: undefined
reference to `do_mphunt'
tables.o(.text+0x8030):/root/mudstuff/smaug/src/tables.c:1326: undefined
reference to `do_offer'
tables.o(.text+0x8156):/root/mudstuff/smaug/src/tables.c:1342: undefined
reference to `do_pfiles'
tables.o(.text+0x83a2):/root/mudstuff/smaug/src/tables.c:1371: undefined
reference to `do_qstat'
tables.o(.text+0x83b7):/root/mudstuff/smaug/src/tables.c:1372: undefined
reference to `do_queststat'
tables.o(.text+0x83e1):/root/mudstuff/smaug/src/tables.c:1374: undefined
reference to `do_quit'
tables.o(.text+0x85af):/root/mudstuff/smaug/src/tables.c:1405: undefined
reference to `do_rent'
tables.o(.text+0x9098):/root/mudstuff/smaug/src/tables.c:1557: undefined
reference to `do_withdraw'
update.o(.text+0x2813): In function `char_update':
/root/mudstuff/smaug/src/update.c:1007: undefined reference to
`sportschan'
update.o(.text+0x3dbb):/root/mudstuff/smaug/src/update.c:1469:
undefined reference to `do_quit'
update.o(.text+0x5d86): In function `update_handler':
/root/mudstuff/smaug/src/update.c:2310: undefined reference to
`in_start_arena'
update.o(.text+0x5d8f):/root/mudstuff/smaug/src/update.c:2310:
undefined reference to `ppl_challenged'
update.o(.text+0x5db2):/root/mudstuff/smaug/src/update.c:2314:
undefined reference to `start_arena'
update.o(.text+0x5db8):/root/mudstuff/smaug/src/update.c:2317:
undefined reference to `ppl_in_arena'
update.o(.text+0x5dcf):/root/mudstuff/smaug/src/update.c:2318: undefined
reference to `num_in_arena'
update.o(.text+0x5de5):/root/mudstuff/smaug/src/update.c:2321:
undefined reference to `do_game'
update.o(.text+0x5e18):/root/mudstuff/smaug/src/update.c:2328:
undefined reference to `quest_update'
update.o(.text+0x5ec3):/root/mudstuff/smaug/src/update.c:2360:
undefined reference to `check_pfiles'
update.o(.text+0x5ecb):/root/mudstuff/smaug/src/update.c:2362:
undefined reference to `quest_update'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/root/mudstuff/smaug/src'
make: *** [all] Error 2


2. PROBLEM SOLVED! n/m... Thu Sep 30, 2004 [6:07 PM]
Klered
Email not supplied
member since: Sep 25, 2001
In Reply To
Reply
Don't forget to make sure you have included ALL your source! =)




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]