Error compiling Dystopia 2 (fixed)

Posted by Dextermovies on Sat 28 Nov 2009 02:47 PM — 4 posts, 19,774 views.

#0
I get this error multiple times when compiling my fightdb.c, I am working with a modified TBW code (THe Beast Within) I am trying to port it to Dystopia 2.

Here is the error

[04:23:36] Linking executable ...
obj/fightdb.o: In function `clear_fdb':
/home/Josh/Desktop/dystopia2/src/fightdb.c:29: undefined reference to `fight_db'
obj/fightdb.o: In function `load_fdb':
/home/Josh/Desktop/dystopia2/src/fightdb.c:61: undefined reference to `fight_db'
obj/fightdb.o: In function `save_fdb':
/home/Josh/Desktop/dystopia2/src/fightdb.c:93: undefined reference to `fight_db'
obj/fightdb.o: In function `do_showfdb':
/home/Josh/Desktop/dystopia2/src/fightdb.c:133: undefined reference to `fight_db'
/home/Josh/Desktop/dystopia2/src/fightdb.c:148: undefined reference to `fight_db'
obj/fightdb.o:/home/Josh/Desktop/dystopia2/src/fightdb.c:148: more undefined references to `fight_db' follow
collect2: ld returned 1 exit status
make: *** [Dystopia] Error 1

Any help here is greatly appreciated

~Josh
USA #1
This means that there is some variable or function called "fight_db" in TBW code that you need to bring along to your Dystopia code, making sure that you handle it the same way as for TBW.
#2
Well I do have this in the TBW and Dystopia code

extern	 int		      fight_db[TOTAL_CLASSES][DATA_OBJECTS];


Here is the part of one command in question :

	sprintf(buf, "Dodge Rating [#C%ld#n%%] Max[#C%d#n%%]\n\r",
		victim->checksum[FDB_DODGE],
		fight_db[loc_class(victim)][FDB_DODGE]);
Amended on Sat 28 Nov 2009 05:28 PM by Dextermovies
#3
Issue fixed, I forgot to include
 int	fight_db[TOTAL_CLASSES][DATA_OBJECTS]; 
in interp.c