[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  Error compiling Dystopia 2 (fixed)

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Error compiling Dystopia 2 (fixed)

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Dextermovies   (65 posts)  [Biography] 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
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Dextermovies   (65 posts)  [Biography] 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]);
[Go to top] top

Posted by Dextermovies   (65 posts)  [Biography] 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
[Go to top] 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]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]