Welcome to the Builder Academy

Question Adding Races

More
29 Aug 2021 18:58 #9890 by h3dg3hug
Adding Races was created by h3dg3hug
Hello, I'm having a hard time adding races to Circle. I'm using a fresh install of tbamud-2020, with the "race0.txt" file from here:  drive.google.com/drive/u/0/folders/0B40X...4C3QUNEZeOe2odDWOpfA

My problem is that it seems to compile fine, until it gets to the end where it spits out the .o's, then hits me with some of this:
Code:
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: act.informative.o: in function `do_who': /cygdrive/c/Users/Eli James/Desktop/tba/src/act.informative.c:1190: undefined reference to `find_race_bitvector' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: act.informative.o:act.informativ:(.rdata$.refptr.pc_race_types[.refptr.pc_race_types]+0x0): undefined reference to `pc_race_types' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: act.informative.o:act.informativ:(.rdata$.refptr.race_abbrevs[.refptr.race_abbrevs]+0x0): undefined reference to `race_abbrevs' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: act.wizard.o: in function `perform_set': /cygdrive/c/Users/Eli James/Desktop/tba/src/act.wizard.c:3320: undefined reference to `parse_race' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: interpreter.o: in function `nanny': /cygdrive/c/Users/Eli James/Desktop/tba/src/interpreter.c:1611: undefined reference to `parse_race' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: interpreter.o:interpreter.c:(.rdata$.refptr.race_menu[.refptr.race_menu]+0x0): undefined reference to `race_menu' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:43: ../bin/circle] Error 1 make[1]: Leaving directory '/cygdrive/c/Users/Eli James/Desktop/tba/src' make: *** [Makefile:30: all] Error 2

I've spent already 6 hrs with this, after 2 days of failing to get OLC + races into a stock Circle3.1... thought this would be an easier way :(

Please Log in or Create an account to join the conversation.

More
29 Aug 2021 20:50 - 29 Aug 2021 20:52 #9891 by thomas
Replied by thomas on topic Adding Races
Somewhere near the end of that output, you're getting told that the linker is struggling because it is attempting to find the race_menu function:
Code:
undefined reference to `race_menu'

It's also telling you that it has found the reference in interpreter.c, in the nanny() function. This is about the same it says for all of them, and it basically means "Well, you said you had a function with this signature, but where the f... is it then?"
Apparently, you've added everything to *.h as you should, because if the prototypes was not found, this would fail earlier.
So, the next point is to have a look at the object files it is searching in. We cant' really see this here, but the patch does not mention the Makefile at all, so it's a free bet you didn't change anything there.

To fix this, open Makefile in your favorite text editor, find the lines with SRCFILES and OBJFILES and add race.c / race.o to them (you'll recognize the pattern). Then do the same with Makefile.in (so it won't go away after you reconfigure).
Now run
Code:
make clean && make depend && make
this first removes any old .o files, recreates the dependency info for the linker and finally builds the binary.
Last edit: 29 Aug 2021 20:52 by thomas.
The following user(s) said Thank You: h3dg3hug

Please Log in or Create an account to join the conversation.

More
29 Aug 2021 21:13 #9892 by h3dg3hug
Replied by h3dg3hug on topic Adding Races
My hero! Just wish I'd come over here yesterday! Haha oh well, every day is a learning lesson. I knew it wasn't linking up right, just didn't know how to "force it". Thanks again, now the fun part can start =)

Please Log in or Create an account to join the conversation.

Time to create page: 0.193 seconds