- 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
32 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Vandit
on 22 Mar 2024
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.
See Also
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!