Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Yandex

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
613
bastian
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » General » Smaug Snippets » Dlsym
Forum Rules | Mark all | Recent Posts

Dlsym
< Newer Topic :: Older Topic > compile question

Pages:<< prev 1 next >>
Post is unread #1 Jun 6, 2003, 4:36 am   Last edited Nov 24, 2007, 12:52 am by Samson
Go to the top of the page
Go to the bottom of the page

Zhamel

GroupMembers
Posts68
JoinedApr 5, 2005

First off, I'm using FUSS. While trying to compile after putting in dlsym I got some errors. I tried to compair it to the AFKmud source but could find no differences that would account for the error. The main problem is the RTLD_LAZY part...
hotboot.c: In function `do_hotboot':
hotboot.c:708: warning: implicit declaration of function `dlclose'
hotboot.c:717: warning: implicit declaration of function `dlopen'
hotboot.c:717: `RTLD_LAZY' undeclared (first use in this function)
hotboot.c:717: (Each undeclared identifier is reported only once
hotboot.c:717: for each function it appears in.)
hotboot.c:717: warning: assignment makes pointer from integer without a cast
make[1]: *** [hotboot.o] Error 1

The prob area is this:
   sysdata.dlHandle = dlopen( NULL, RTLD_LAZY );
  if( !sysdata.dlHandle )
  {
bug( "%s", "FATAL ERROR: Unable to reopen system executable handle!" );
exit( 1 );
  }
       
Post is unread #2 Jun 6, 2003, 6:44 am   Last edited Nov 24, 2007, 12:52 am by Samson
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

The main problem is the RTLD_LAZY part...
hotboot.c: In function `do_hotboot':
hotboot.c:708: warning: implicit declaration of function `dlclose'
hotboot.c:717: warning: implicit declaration of function `dlopen'
hotboot.c:717: `RTLD_LAZY' undeclared (first use in this function)
hotboot.c:717: (Each undeclared identifier is reported only once
hotboot.c:717: for each function it appears in.)
hotboot.c:717: warning: assignment makes pointer from integer without a cast

You probably need to include the system header for the dl family of functions. Under OpenBSD (and most unix flavors), that's:
#include 

found via:
bash-2.05b$ grep RTLD_LAZY /usr/include/*.h
/usr/include/dlfcn.h:#define RTLD_LAZY  DL_LAZY         /* SunOS Compat */

I have no idea what a FUSS is, but the AFK source includes this header in 5 files:
comm.c:#include 
db.c:#include  /* Required for libdl - Trax */
hotboot.c:#include     /* Required for libdl - Trax */
mspecial.c:#include 
tables.c:#include 

Good luck!
       
Post is unread #3 Jun 6, 2003, 8:35 am
Go to the top of the page
Go to the bottom of the page

Zhamel

GroupMembers
Posts68
JoinedApr 5, 2005

Bleh. Like usual, the simplest solution...
Danka.
       
Pages:<< prev 1 next >>