Closed shakfu closed 11 months ago
Simply using the -I /path/to/lib model used in the args/arg parameters of createXXFactory
API ?
Thanks @sletz
Simply using the -I /path/to/lib model used in the args/arg parameters of createXXFactory API
So basically for let's say interpreter_dsp_factory* createCInterpreterDSPFactoryFromFile(const char* filename, int argc, const char* argv[], char* error_msg)
I just pass path to the libs in the argv[] params.
Ok, I'll have to read up a bit more on how to that. Thanks!
Yes exactly.
@sletz
Ok, so it look like you are referring the -I dir
option in the Faust Compiler Options page
-I <dir> --import-dir <dir> add the directory <dir> to the libraries search path.-I <dir> --import-dir <dir> add the directory <dir> to the libraries search path.
Yes indeed.
@sletz
Thanks, Incidentally, I have done a little work already which may be of interest: https://github.com/shakfu/faustlab
Any advice on which parts of the api to wrap would be appreciated!
Looking here, I would say: createInterpreterDSPFactoryFromFile, createInterpreterDSPFactoryFromString, deleteInterpreterDSPFactory, deleteAllInterpreterDSPFactories, readInterpreterDSPFactoryFromBitcode, writeInterpreterDSPFactoryToBitcode, readInterpreterDSPFactoryFromBitcodeFile, writeInterpreterDSPFactoryToBitcodeFile
are the most important.
@sletz Thanks!
While building
libfaust.a
with the interp backend in my recent issue-9273, I found that it was possible to make the location of the directory containing the faust libraries (stdfaust.lib
, ...) in<prefix>/share/faust
available to compiled code using the interp api by also building thefaust
executable and putting it<prefix>/bin/faust
in PATHWhile this is fine for testing, I would like to wrap the parts of the
interp
api in a cython-based (compiled) python extension and make it self-contained (with the standard libraries packaged inside the python package) along with the extension.In order to do that I will have to set the path of the Faust standard libs at runtime based on the user install location. So basically, I'm looking for the equivalent of programmatically setting in c or cpp the path of packaged Faust standard libraries.
I would appreciate some guidance on how to do this from the cpp or c apis.
Thanks in advance for any help on this front.