Skip to content

Commit

Permalink
Don't throw error if MATLAB libraries don't load
Browse files Browse the repository at this point in the history
  • Loading branch information
taylormcd authored Nov 2, 2021
1 parent 74b9abe commit a028a24
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Mex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ const libut = Ref{Ptr{Cvoid}}()
const ut_is_interrupt_pending = Ref{Ptr{Cvoid}}()

function __init__()
libmex[] = Libdl.dlopen(joinpath(MATLAB.matlab_libpath, "libmex"), Libdl.RTLD_GLOBAL)
mex_call_matlab_with_trap[] = Libdl.dlsym(libmex[], :mexCallMATLABWithTrap)

libmex[] = Libdl.dlopen(joinpath(MATLAB.matlab_libpath, "libmex"), Libdl.RTLD_GLOBAL; throw_error=false)
mex_call_matlab_with_trap[] = Libdl.dlsym(libmex[], :mexCallMATLABWithTrap; throw_error=false)

libut[] = Libdl.dlopen(joinpath(MATLAB.matlab_libpath, "libut"), Libdl.RTLD_GLOBAL)
ut_is_interrupt_pending[] = Libdl.dlsym(libut[], :utIsInterruptPending)
libut[] = Libdl.dlopen(joinpath(MATLAB.matlab_libpath, "libut"), Libdl.RTLD_GLOBAL; throw_error=false)
ut_is_interrupt_pending[] = Libdl.dlsym(libut[], :utIsInterruptPending; throw_error=false)
end

# --- Patches --- #
Expand Down

0 comments on commit a028a24

Please sign in to comment.