Integrating MATLAB With Sheel Extension?

I know this post is old, but I am working on something similar for my thesis.

MATLAB has an API and can interface with C++.

The documentation for that is: https://www.mathworks.com/help/matlab/calling-matlab-engine-from-c-c-and-fortran-programs.html
with a video of how to do it in Visual Studio here: Integrating MATLAB and C/C++, Part 2: Visualizing and Testing C/C++ Code - Video - MATLAB

What needs to happen is you need to add the following directory for includes:
C:\Program Files\MATLAB\R2015b\extern\include

Add the following directory for libraries:
C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft

And add the following libraries to your solution:
libmx.lib
libmat.lib
libeng.lib

From what I have understood of adding these to an unreal program, you need to modify the build.cs by adding the following lines (i don’t know if this could be cleaner…):
PublicSystemIncludePaths.Add(“C:/Program Files/MATLAB/R2015b/extern/include”);

PublicLibraryPaths.Add(“C:/Program Files/MATLAB/R2015b/extern/lib/win64/microsoft”);

PublicAdditionalLibraries.Add(“C:/Program Files/MATLAB/R2015b/extern/lib/win64/microsoft/libmx.lib”);
PublicAdditionalLibraries.Add(“C:/Program Files/MATLAB/R2015b/extern/lib/win64/microsoft/libmat.lib”);
PublicAdditionalLibraries.Add(“C:/Program Files/MATLAB/R2015b/extern/lib/win64/microsoft/libeng.lib”);

When I do this, everything compiles fine. The problem begins when I try to run a new instance and debug the program. I get the following error:

The program can’t start because libeng.dll is missing from your computer. Try reinstalling the program to fix this problem.

I know the dll exists. It exists at C:/Program Files/MATLAB/R2015b/bin/win64/.

When I had this issue just doing this for a normal visual studio program, I added the following to the Environment in the properties tab of the project:

PATH=C:\Program File\MATLAB\R2015b\bin\win64\

And it fixed it.

However, when I do the same for unreal, it does not work…any ideas?