There is a project in Visual Studio that simulates physics. It uses some functions from the library gsl. I wrote a C++ plugin my plugin.dll
to call functions from this project inside Unity. It acts as an interface, where you pass parameters and it calls the project' functions.
Initially the Visual Studio build was generating only myplugin.dll
and C# was calling the C++ functions just fine. Probably because the functions it was calling didn't use the gsl functions.
After I added more functions, some of them had to use things from gsl, so when I generate the build, one more file (gsl.dll
) was generated.
When I drag all build files (from the x64/Release folder) to Unity Assets folder and run my project, it breaks, giving me this error:
I'm pretty sure the problem is the need of this extra gsl.dll
. The functions work fine while testing inside visual studio, so I guess gsl is fine. How can I approach this problem?