libmwtbbhist.dll not found when using dynamic library in visual studio project

1 view (last 30 days)
I generated .dll files for my functions using C++ as shown below.
I followed https://uk.mathworks.com/help/coder/ug/use-a-c-dynamic-library-in-microsoft-visual-studio-project.html#d123e57210 to build the C++ in visual studio 19 and it works ok with the example Foo function. I copied over my generated .dll files to the folder containing the executable.
However, when I add my function to the project, I cannot run it with error saying "A dependant dll was not found". It is missing libmwtbbhist.dll (and possibly more).
When I tried to copy the .dll into the folder containing the executable, I can only see libmwtbbhist.lib and copying the .lib does not work.
What would be the correct way to generate .dlls?
Thanks and regards,
Hein

Accepted Answer

Denis Gurchenkov
Denis Gurchenkov on 7 Feb 2022
On the last page in the MATLAB Coder UI, there is a "package" button in the top right part of the screen. If you click it, it would create a .zip file containing the generated C/C++ code, along with all the auxiliary files the code uses. Can you please check if libmwtbbhist.dll is included there?
If that does not work, you can copy libmwtbbhist.dll from matlab/bin/win64

More Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!