Sanity check about the current state of the Faust dynamic LLVM on Windows

Hi there,

I am trying to get the Faust example to work on Windows 10 and I’m encountering problems creating the llvm factory. I am using the latest (pre-build binaries) Faust. Anyone had any success doing this on Windows?

I am thinking switching to the pure C version of the factory interface (defined in llvm-c-dsp.h) instead of the C++, just in case there is some kind of runtime conflict between the std::string types in the pre-compiled faust.dll.

Additionally, I noticed that the library indicates to use the startMTDSPFactories() and stopMTDSPFactories() if the application is multi-threaded. Needless to say that I already tried that without any success so far …

Any other ideas would be welcome!

–Stefanos

Unfortunately i have the same issue with the faust installer from grame on windows 10. If I remember correctly a few weeks ago I was able to make it work with a debug build of the libfaust.dll that I did myself. I have a windows 7 machine where it works… it’s quite tricky to debug exactly what is going wrong. Stephane from grame told me that the C interface worked for him in a test, so maybe we should try and switch to that.

i wrote some notes in the readme

Thank you Oliver.
I will proceed building a debug version of LLVM and Faust to enable dynamic faust compilation during development. At least the end result can be used without issue in Released plugins.
The c version kind of works, but it actually corrupts memory. My gut fulling is that the memory allocation routines build into faust are incompatible with the VS Studio 2019 that I using to compile the iPlug2 example. Also, it is not great that one of the parameters (std:string& error) is an std:string object are is passed by reference. This is not guaranteed to work across binaries compiled with different runtime libraries. Same for the (char *) version of the same parameter that is allocated and returned as out param on the “C” version of the API. At least the good news is that this call is not required in Release (FAUST_COMPILED) mode.

Best,
–Stefanos

yes, also you can forget about JIT altogether and just use faust.exe on the command line, or as a build step in visual studio

faust.exe -cn Faust1 -i -a ..\..\IPlug\Extras\Faust\IPlugFaust_arch.cpp -o FaustCode.hpp IPlugFaustDSP.dsp