When dynamically linking a library is there a way to specify a fallback symbol in case one is missing at load time.
For example compiling a MEX file instead of mxCreateNumericArray
I'd like to call mxCreateUninitNumericArray
(with same signature). But the latter won't be present for older MATLAB versions. Same for mxArrayToString
and mxArrayToUTF8String
.
For MSVC I've been able to use /DELAYLOAD and hook into __pfnDliFailureHook2
on dliFailGetProc
to provide a simple mapping. But what can I do on Unix based systems?
How to hook into libld
in a similar way?