I have a couple of dynamic libraries that I needed to access. I have used ccall statements. I have started to use Clang to generate the wrapper code. This gives a good start at developing the code I require.
I one case I created the ccall statements by hand and then when I learned about Clang I tried it. In the simpler calls it created the code I wanted. In other cases it was a really good start, eliminating much tedious work.