You can’t do that. The name and library to ccall has to be a constant. If there’s no way to determine the name at pre-compilation time, you should use dlopen and dlsym manually. I believe PyCall uses it.
3 Likes