libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libltdl segfaults on lt_dlsym


From: Roger Leigh
Subject: Re: libltdl segfaults on lt_dlsym
Date: 30 Dec 2002 19:17:52 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Conrad Canterford <address@hidden> writes:

> This is almost certainly a user error, not a libltdl error, but I cannot
> work out how to make this work. I have a .so file which contains my user
> interface. The main program finds the path to it and the names of
> varioius subroutines within it from within its config file. It does an
> lt_dlinit(), and then an lt_dlopen(char */path/to/library). This works
> fine, and I can see the handle returned. However, I next try and do an
> lt_dlsym(handle, char *symname), and it segfaults each and every time.
> Is there some step I'm missing, or something else I'm likely to have
> forgotten to do that is required?

Have you named the symbol(s) correctly in the module?  They should be
prefixed with "modulename_LTX_"?

Check with "nm -D":
000af960 D pcl_LTX_stp_module_data
000af944 D pcl_LTX_stp_module_version
(in this case, the module is pcl.la and pcl.so, and the symbols I ask
for with dlsym() are "stp_module_data" and "stp_module_version").

See libtool.info, node "Modules for libltdl".  This had me stumped for
a while, until I found a typo in the module name part of the symbol!


HTH,
Roger

-- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848 available on public keyservers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]