Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Bing

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,396
629
DarrenPayn
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Issues with moving to g++
Forum Rules | Mark all | Recent Posts

Issues with moving to g++
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 28, 2009, 5:59 am
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
JoinedJun 9, 2009

Well that did it. I broke my mud. :redface:

I got everything to compile, not quite cleanly yet but it does compile and the mud starts up, I can connect and log in and everything is looking good. Except for the fact that none of the commands are getting loaded into the game now, so the only thing I can do is use socials. Does anyone have any idea whatsoever as to what caused this little issue?

Here's what the log sequence is showing during skill loading.
Tue Jul 28 06:46:20 2009 :: [*****] BUG: Error locating do_tractorbeam in symbol table. ./../bin/swic: undefined symbol: do_tractorbeam
Tue Jul 28 06:46:20 2009 :: [*****] BUG: fread_skill: unknown skill/spell do_tractorbeam

I'm getting this for every skill, spell and tongue in the game. Herbs too.

And on a slightly unrelated note, as far as the no commands issue is concerned, does anyone know what the stuff in the id.c file was supposed to do? I had to remove it, and everything related to it, due too compile errors.
       
Post is unread #2 Jul 28, 2009, 12:09 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

Yep been there and done that. You will have to update what ever you use to locate the information for commands and skills code wise that is. Chances are that you might just need to toss in an extern "C" in the define for DECLARE_DO_FUN or something lol.
       
Post is unread #3 Jul 28, 2009, 12:30 pm   Last edited Jul 28, 2009, 3:33 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

That stuff in id.c was mostly useless garbage. It's supposed to do an ident query on anyone who connects but that sort of thing quit being popular some time back in 1997. The Smaug code for it never did work entirely right anyway, and since hardly anyone's connections could respond to it, it was a huge waste.
       
Post is unread #4 Jul 28, 2009, 12:48 pm   Last edited Jul 28, 2009, 1:46 pm by Andril
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
JoinedJun 9, 2009

Figures. I go through a bunch of files in both SWR and Smaug from the site, looking to see how things are done there when I got an error/warning during compile, and I completely missed that.

So, I copied the #define's for DECLARE_DO_FUN and friends from Smaug, and wouldn't you know it. I get a ton more errors. :) Time to do a little more in-depth digging through mud.h, to see if I need to grab something else.

Edit:
Hmm, it looks like most of the errors are from doing stuff like "int get_door args( ( char *arg ) );".

WOW. The g++ compiler is PICKY!

mud.h:347:26: error: "10" may not appear in macro parameter list

#define PULSE_CHALLENGE( 10 * PULSE_PER_SECOND)
changed to
#define PULSE_CHALLENGE ( 10 * PULSE_PER_SECOND)

One little space makes a big difference.

Edit 2:
Now to figure out what's going on with this.

account.c:164: error: expected `)' before ";" token
DISPOSE( ch );
       
Post is unread #5 Jul 28, 2009, 3:34 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,644
JoinedJan 1, 2002

Andril said:

Edit 2:
Now to figure out what's going on with this.

account.c:164: error: expected `)' before ";" token
DISPOSE( ch );


Check carefully how well you copied the DISPOSE macro, that's where the actual error is coming from.
       
Post is unread #6 Jul 28, 2009, 10:02 pm
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005


Samson said:

That stuff in id.c was mostly useless garbage. It's supposed to do an ident query on anyone who connects but that sort of thing quit being popular some time back in 1997. The Smaug code for it never did work entirely right anyway, and since hardly anyone's connections could respond to it, it was a huge waste.


Truth!

Back in 1995, I went to some effort to merge an ident library into my game. I got it working, and even had it default to the name "luser" if no ident data came back. I went so far as to stick a nag mesage during the login sequence, to remind people to use it.

In the end, only about 5% of the people who connected that weren't from our own university actually returned data... nowadays, I would guess most personal firewalls would block the request even if you did have an ident server running.
       
Post is unread #7 Jul 29, 2009, 1:45 am   Last edited Jul 29, 2009, 2:25 am by Andril
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
JoinedJun 9, 2009

Thanks for that tip Samson. DISPOSE was indeed missing a second ')' at the call to free(). Was another one in ASSIGN_GSN and a couple in CHECK_LINKS.

Unfortunately commands and whatnot are still not loading. Still getting the undefined symbol error messages from skill_function. Oddly enough, not from spell_function anymore. Time to take a closer look at those two and see what's done differently.

Got it. Needed to add all the DECLARE_DO_FUN( do_whatever );'s back into mud.h. I'd pulled them out because they weren't necessary under gcc, and I wanted to decrease file size as much as possible to save space on the HD. But this gives me the opportunity to sort them in a, to me, intelligent manner.
       
Pages:<< prev 1 next >>