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

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

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


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

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

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

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


3,969 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]