copyover7 on a swrip codebase

Posted by Kazer on Tue 10 May 2005 04:43 AM — 7 posts, 27,611 views.

#0
After following the directions I ended up with these errors. I didnt add the copyover.c file instead i put the functions but not the declarations into comm.c at the bottom. I'm not quite sure what to do with this kind of error, never seen it before. Please help.
-----------------------------------------------------------
db.o(.text+0x2dfc): In function `boot_db(bool)':
/home/mud/lotl/marlius/swrip2/src/db.c:807: undefined reference to `copyover_recover()'
tables.o(.text+0x1bf5): In function `skill_function(char*)':
/home/mud/lotl/marlius/swrip2/src/tables.c:270: undefined reference to `do_copyover(char_data*, char*)'
tables.o(.text+0x7413): In function `skill_name(void (*)(char_data*, char*))':
/home/mud/lotl/marlius/swrip2/src/tables.c:1093: undefined reference to `do_copyover(char_data*, char*)'
collect2: ld returned 1 exit status
swrip: No such file or directory
swrip: No such file or directory
chmod g+w swrip
chmod: failed to get attributes of `swrip': No such file or directory
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/home/mud/lotl/marlius/swrip2/src'
make: *** [all] Error 2
-----------------------------------------------------------
USA #1
Make sure you declare that function in the main header file, which should be mud.h
#2
I did define "void copyover_recover args((void));" and "DECLARE_DO_FUN(do_copyover);" in mud.h, I went over the instructions again and the same error came up. I dont understand why this is happening as far as I can tell this should work.
USA #3
Make sure you did a make clean. Also, will you post the lines you added in tables.c here?
#4
I did a make clean and the errors still remain, I tried again before posting as well. In tables.c I added these two lines.
"if(!str_cmp(name, "do_copyover")) return do_copyover;"
"if(skill == do_copyover) return "do_copyover";"
I put them both after the do_consider lines.
#5

From what I can tell, what has been suggested should work. All you need is the function declared, the function in tables.c, and the DECLARE_DO_FUN in mud.h

Make sure you updated mud.h on the server. Make clean, make sure tables.o no longer exists, and recompile...

Not much more we can suggest :)

Darrik Vequir
USA #6
Maybe you should try installing it exactly as stated in the instructions, rather than moving the functions around as you did. You might have missed a step somewhere and not noticed, or perhaps something is implicit in the instructions that you have and you aren't even aware that you've changed something you shouldn't?

Just a suggestion.