Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ General ➜ Error compiling Dystopia 2 (fixed)

Error compiling Dystopia 2 (fixed)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Dextermovies   (65 posts)  Bio
Date Sat 28 Nov 2009 02:47 PM (UTC)
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
Date Reply #1 on Sat 28 Nov 2009 05:05 PM (UTC)
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)

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)
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.


15,627 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.