|
Error compiling Dystopia 2 (fixed)
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Dextermovies
(65 posts) bio
|
| Date |
Sat 28 Nov 2009 02:47 PM (UTC) [ quote
] |
| Message |
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 | top |
|
| Posted by |
David Haley
USA (3,881 posts) bio
Moderator |
| Date |
Reply #1 on Sat 28 Nov 2009 05:05 PM (UTC) [ quote
] |
| Message |
| 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. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|
| Posted by |
Dextermovies
(65 posts) bio
|
| Date |
Reply #2 on Sat 28 Nov 2009 05:24 PM (UTC) [ quote
] Amended on Sat 28 Nov 2009 05:28 PM (UTC) by Dextermovies
|
| Message |
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]);
| top |
|
| Posted by |
Dextermovies
(65 posts) bio
|
| Date |
Reply #3 on Sat 28 Nov 2009 07:01 PM (UTC) [ quote
] |
| Message |
Issue fixed, I forgot to include
int fight_db[TOTAL_CLASSES][DATA_OBJECTS];
in interp.c | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
1,523 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )