- Although you have mentioned ensuring the same environment on both machines, it is sometimes easy to overlook subtle differences. Please ensure the MATLAB Runtime version is the same on both machines. Also, check that the application, MATLAB Runtime and the DLL all match in being either 32-bit or 64-bit. This can help identify any compatibility issues.
- Use tools like Dependency Walker or Microsoft's Process Explorer to ensure all dependencies of your DLL, including indirect ones, are present on the target machine.
- Try running the application as an administrator on the target machine to rule out permission issues. Also, verify that no antivirus or security software on the target machine is blocking the DLL.
- If your DLL was built with a specific version of Visual C++, the corresponding Visual C++ Runtime might be required on the other machine. Ensure that the correct version is installed.
loadlibrary error when trying to load a dll for a matlab compiled application
54 次查看(过去 30 天)
显示 更早的评论
I created a Matlab compiled application which calls a dll using loadlibrary. The compiled application works fine in my local machine and load library gets executed fine. But the compiled application doesn't work in another machine and errors out at loadlibrary. I have almost tried everything I could. But still feel there might be a missing dependency. Need help in resolving as the compiled application works fine in my local machine and I have made sure the other machine where it doesnt work has same environment and everything else.
0 个评论
回答(1 个)
Vandit
2024-3-22
Hello ss,
I understand that you are encountering an issue with MATLAB compiled application, especially with the "loadlibrary" function when running on a different machine. Here are several steps that you can take to resolve this issue:
Hope this helps.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 C Shared Library Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!