How to Build Models as Shared Libraries (DLL)?

Hi All,

Can you please suggest some elegant way to use auto generated model’s C++ code without making them as executables? Instead of it I want to make some DLL with similar functionality like in model’s executables.

I tried to use logged g++ command(with few changes) for this purpose, but built DLL was incorrect (I couldn’t load it with QLibrary(Qt)).

Did someone tried to do similar thinks? If yes please help.

My final purpose is to use auto generated C++ code in other libraries. If you have better solution please suggest.

Thanks,
Levon

1 Like

I missed this when it first came around. I don’t know anyone who’s done this and none of the stan devs are Windows developers.

The model that gets generated is just C++ code, so you can wrap it up any way you want, including using it header only (though you’ll need the precompiled differential equation solvers if you want to solve stiff systems in the body of the program).