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 ➜ SMAUG ➜ Compiling the server ➜ Compiling Dreams Of Demis using Linux(Fedora)

Compiling Dreams Of Demis using Linux(Fedora)

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


Posted by Niklaren   (3 posts)  Bio
Date Tue 15 Jan 2008 02:34 AM (UTC)
Message
I am trying to compile dreams of demise using linux, however I have been getting this error.


gcc -c -g3 -ggdb -Dlinux act_comm.c
In file included from act_comm.c:12:
merc.h:890: error: array type has incomplete element type
In file included from act_comm.c:12:
merc.h:6400: error: array type has incomplete element type
make: *** [act_comm.o] Error 1
[Timothy@localhost src]$


/*
* J.O.P.E - Jobo Online Playerfile Editor
*/
bool jope_load_char args ((CHAR_DATA * ch, char *arg));
void jope_free_char args ((CHAR_DATA * ch));
void jope_interp args ((CHAR_DATA * ch, char *argument));

890>extern const struct jope_type jope_table[];
extern ALIAS_DATA * alias_free;
struct jope_type




void load_immortals ();
extern const char *imm_ranks[];
6400>extern struct immortal_list immlist[999];

any help would be appreciated
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 15 Jan 2008 03:20 AM (UTC)
Message
You need to define what "jope_type" is before you declare an array of jope_type elements.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Niklaren   (3 posts)  Bio
Date Reply #2 on Tue 15 Jan 2008 03:32 AM (UTC)
Message
Thank you so much for your help David, both in this topic as well as my previous topic.

As I am still very new to coding, I was wondering if you could go in to further depth in regards to what to do.

Again I appreciate your help
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Tue 15 Jan 2008 05:30 AM (UTC)
Message
Sure. When you compile code, every type you use (well, really, pretty much everything you use) has to be something the compiler has seen before. If I tell you: here is an object of type "foobar", you will look at me and go "huh? what's a foobar?" The compiler works just the same way.

So, when you define a structure of type "jope_type", that definition has to come before any case where you use that structure. So, the following code is not going to work:

jope_type theStructure;
struct jope_type {
  int member1;
  int member2;
  /* ... */
};

But if you reverse the order, it will work, since the compiler knows what a "jope_type" is when you try to create the object of that type.

Let me know if this clears things up. I suspect you are using a code snippet (given the "Jobo Online Playerfile Editor" name), so one recommendation is to make sure you followed it exactly -- these things tend to be extremely finnicky and even a slight variation (that seems trivial to you) can be enough to break the code.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #4 on Tue 15 Jan 2008 02:34 PM (UTC)
Message
One might also keep in mind that the instructions probably worked just fine before the days of gcc 4 when this situation would not be detected and the code would actually compile properly. Old snippets and codebases cause nightmares like this all the time when nobody sees fit to update them. :)
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #5 on Wed 16 Jan 2008 01:48 AM (UTC)
Message
Having never heard of this one, and being somewhat curious, what is this "J.O.P.E - Jobo Online Playerfile Editor" and where might one find a copy of it? (If you don't mind my asking...)

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Wed 16 Jan 2008 02:01 AM (UTC)
Message
Google is your friend. ;-)

http://www.google.com/search?hl=en&safe=off&q=jobo+online+editor+jope&btnG=Search

2nd result:
http://www.dystopiamud.dk/snippets.php

5th snippet.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #7 on Thu 17 Jan 2008 05:50 AM (UTC)
Message
Weird, I'd tried googling it almost exactly like that before I'd posted that and the only hits I found that appeared pertinent were to this thread. :(

Oh well, in any event, thanks for the link, David, now if I can just reach that site... *sigh*

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #8 on Thu 17 Jan 2008 07:38 PM (UTC)
Message
The link works for me as of this posting (and when I posted it in the first place). It's possible that the server is a little flaky, though...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #9 on Fri 18 Jan 2008 04:03 AM (UTC)
Message
Nah, problem with my firewall, and it's all fixed. Looks like an interesting snippet, but I think Smaug's loadup command really already covers it. *shrug*

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
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.


27,835 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.