what am I missing here with that working dir?

DFTW jckj33 at gmail.com
Fri Mar 15 21:48:50 UTC 2019


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")



More information about the Digitalmars-d-learn mailing list