[erlang-questions] How to load a port driver which itself uses a shared library?

Diptansu Das <>
Fri May 15 15:25:41 CEST 2015


Yes, I tried with LD_LIBRARY_PATH and -rpath. Neither worked. This is on
Linux. I also tried using the erl_ddll:format_error/1 and that said that
one of the functions was undefined. The function is actually in a .so file
in the same directory.

On Fri, May 15, 2015 at 3:36 AM, Boris Mühmer <>
wrote:

> Is Your work Linux based? If so, did You try to set LD_LIBRARY_PATH? But
> this is only needed, if Your shared library dependency is in an unusual
> location. There are other ways, to specify non-default shared library
> pathes as well, but LD_LIBRARY_PATH may be the fastest to test for
> non-default pathes.
>
> For gcc you can specify -static when linking to force to use no dynamic
> libraries. Another approach would be to use "-Wl,-rpath=...".
> Maybe You should have a look at
>
> http://stackoverflow.com/questions/8835108/specify-non-default-shared-library-path-in-gcc-linux
>
> Regards,
> Boris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150515/5b2fe72a/attachment.html>


More information about the erlang-questions mailing list