I'd like to call a executable which works fine on terminal if called within the bin directory otherwise it give missing issues. To archive the same on my D program, I did set the working dir but I get an error saying a .so file couldn't be found. What am I missing here?

enum app = "/path/to/wkhtmltox-0.12.4_linux-generic-i386/wkhtmltox/bin/wkhtmltopdf";
    enum html = "/path/to/my/htmlFile.htm";
    enum pdf = "/path/to/output/foo.pdf";
    // is this the correct working dir?
enum workingDir = "/path/to/wkhtmltox-0.12.4_linux-generic-i386/wkhtmltox/bin";
    import std.process : execute, Config;
    auto conv = execute([app, html,pdf],
                        null,
                        Config.none,
                        size_t.max,
                        workingDir);
    writeln(conv);

Gives the error:

Tuple!(int, "status", string, "output")(127, "/path/to/wkhtmltox-0.12.4_linux-generic-i386/wkhtmltox/bin/wkhtmltopdf" error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory\n")

Reply via email to