Synergize Libdl.find_library and include_dependency

95 views
Skip to first unread message

Jay Weisskopf

unread,
Aug 26, 2015, 12:30:34 AM8/26/15
to julia-dev
I maintain a package that wraps a dynamic library. To better support pre-compilation, the first thing I tried was:

const lib = Libdl.find_library(...)
include_dependency(lib)

Unfortunately, my intuition was wrong because find_library's return value does not include the library's file extension. Is there a simple way to handle this that I'm missing? I could append the file extension, but it varies depending on platform, and I'd rather not try to (poorly) create the logic to figure it out.

- Jay

Tony Kelman

unread,
Aug 26, 2015, 12:56:40 AM8/26/15
to julia-dev
Libdl.dlext ?

Jay Weisskopf

unread,
Aug 26, 2015, 1:08:01 AM8/26/15
to julia-dev
Ah, yeah, that should do the trick. I wasn't aware of it since it's not in the docs. Guess I should have tab-completed "Libdl." in my REPL :-)

Tim Holy

unread,
Aug 26, 2015, 5:25:07 AM8/26/15
to juli...@googlegroups.com
Doc improvements are always welcome, and best made by the people who would
have benefited from them. :-)

https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation

--Tim
Reply all
Reply to author
Forward
0 new messages