lua-users home
lua-l archive

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


On Wed, Jul 26, 2017 at 8:33 AM, Daurnimator <quae@daurnimator.com> wrote:
> On 27 July 2017 at 01:17, Russell Haley <russ.haley@gmail.com> wrote:
>> On Wed, Jul 26, 2017 at 7:56 AM, Luiz Henrique de Figueiredo
>> <lhf@tecgraf.puc-rio.br> wrote:
>>>> Oh, and I did test the current patch last night and it builds and
>>>> returns the expected result.
>>>
>>> But does it support dynamic libraries and readline?
>>
>> Can you describe a simple test for dynamic library support? Again, I
>> need more context into what that means for Lua and FreeBSD. My
>> assumption means allowing Lua to be dynamically linked into another
>> application?
>
> It's a question of where the 'dlopen' function and friends live.
> In glibc on linux, the function is in libdl.so
> Whereas on other distros (including freebsd) they are part of libc.
>
> Usually you can find out if '-ldl' is required by looking at the
> dlopen man page of the system in question.
>

Thanks again Daurnimator!

/*********************FreeBSD**********************/

DLOPEN(3)              FreeBSD Library Functions Manual              DLOPEN(3)

NAME
     dlopen, fdlopen, dlsym, dlfunc, dlerror, dlclose - programmatic interface
     to the dynamic linker

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <dlfcn.h>

     void *
     dlopen(const char *path, int mode);

     void *
     fdlopen(int fd, int mode);

     void *
     dlsym(void * restrict handle, const char * restrict symbol);

     dlfunc_t
     dlfunc(void * restrict handle, const char * restrict symbol);

     char *
     dlerror(void);

     int
     dlclose(void *handle);


/***************Debian Jessie**********************/

DLOPEN(3)
      Linux Programmer's Manual
                            DLOPEN(3)

NAME
       dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming
interface to dynamic linking loader

SYNOPSIS
       #include <dlfcn.h>

       void *dlopen(const char *filename, int flag);

       char *dlerror(void);

       void *dlsym(void *handle, const char *symbol);

       int dlclose(void *handle);

       Link with -ldl.