Cannot run shared object in batch mode

@couet
I know that it works in various different ways.
This post is resulting from my previous post, for which I am still looking for an optimal solution.