I am new to C++ and English, I am trying to write some tools using Maya C++ api, but I have some problems when trying to use third-party libraries.
I am using Microsoft. Ml. Onnxruntime. Gpu. 1.16.3
When, encountered some problems, it can compile normally in Visual Studio, but can not load in maya, I put Microsoft. Ml. Onnxruntime. Gpu. 1.16.3/runtimes/win - x64/native folder all DLL copied to maya20xx/bin directory, it can being loaded and running, When I tried to put the.dll file in the bin directory of the environment variable, it said 'Unable to dynamically load', I don't understand why, it only happens in Windows 10 environment, I also tested opencv, opencv loads normally
My attempts to add '.dll 'to the path environment variable, or using' MAYA_PLUG_IN_PATH 'failed, but when I tried to use window11 and add'.dll 'to the path environment variable, it worked. I want to use a higher version of onnxruntime in windows10, I don't know how to do it
Adding the dll to the maya20xx/bin folder should make the dll visible to Maya. If the plugin was linked to the corresponding onnxruntime.lib, the .dll will load.