Ccall library as a variable string

It is usually quite helpful to include the error message you get; “does not work” is not really much to go on.

I suspect all you need is to make your variable const:

const mylib = "/home/mikel/mylibraries/libCbin_IO"
ccall((:lwrite,mylib), Cvoid, ())

See also PSA: how to quote code with backticks

1 Like