can't find Matlab coder generated mexFunction

3 次查看(过去 30 天)
Hello,
I used Matlab Coder to generate a randn mexFunction and used it in another mexFunction. The code runs perfectly well on two computers but not on the third one. Matlab said can't find randn1.mexw64.
What could have happened?
Thanks.

回答(2 个)

Titus Edelhofer
Titus Edelhofer 2012-5-2
Hi,
perhaps the third computer is a 32bit MATLAB/Windows? Just enter
mexext
in the 3rd computer. If it returns mexw32, you have to generate and compile the code on the 3rd computer again ...
Titus
  11 个评论
Jane Jean
Jane Jean 2012-5-4
Thanks for the reply. Unfortunately the module which was not found was generated with Matlab Coder. I did not at all use Visual C++ to write this mexFunction. It is just the normal Matlab randn function generated by Coder.
Jane Jean
Jane Jean 2012-5-4
It is true that other DLLs on which the mexFunction depends are not found. I used dependencywalker.exe to check it. The missing DLLs are libmx.dll, libmex.dll, libemlrt.dll and libmwmathutil.dll.
What can I do to make this mexFunction find these files ?

请先登录,再进行评论。


Jane Jean
Jane Jean 2012-5-4
I have read somewhere that a possible solution is to use dependencywalker to check the required files needed to run the mexFunction.
I have tried that and here are the missing files: libmx.dll libmex.dll libemlrt.dll libmwmathutil.dll
What should I do to make the mexFunction find these missing .dll files?
Thanks.
  4 个评论
raym
raym 2024-11-8
After I add bin/win64 folder to systen path and relaunch the dependencywalker, now the Mathwork dlls got resolved, and further walking reveals new missing dlls.
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
raym
raym 2024-11-8
But the dlls exsit in my PC:
C:\Windows\System32\downlevel\API-MS-Win-Core-Kernel32-Private-L1-1-1.dll
C:\Windows\SysWOW64\downlevel\API-MS-Win-Core-Kernel32-Private-L1-1-1.dll
C:\Windows\WinSxS\amd64_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_6.3.9600.16384_none_2c5177c069a919dd\API-MS-Win-Core-Kernel32-Private-L1-1-1.dll
C:\Windows\WinSxS\x86_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_6.3.9600.16384_none_d032dc3cb14ba8a7\API-MS-Win-Core-Kernel32-Private-L1-1-1.dll
C:\Users\rmd\AppData\Local\GeoGebra_6\app-6.0.583\API-MS-Win-Core-Kernel32-Private-L1-1-1.dll
-----
C:\Windows\System32\downlevel\api-ms-win-core-privateprofile-l1-1-1.dll
C:\Windows\SysWOW64\downlevel\api-ms-win-core-privateprofile-l1-1-1.dll
C:\Windows\WinSxS\amd64_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_6.3.9600.16384_none_2c5177c069a919dd\api-ms-win-core-privateprofile-l1-1-1.dll
C:\Windows\WinSxS\x86_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_6.3.9600.16384_none_d032dc3cb14ba8a7\api-ms-win-core-privateprofile-l1-1-1.dll
C:\Users\rmd\AppData\Local\GeoGebra_6\app-6.0.583\api-ms-win-core-privateprofile-l1-1-1.dll
-----this one may be missing, I will copy it and have a try
C:\Users\rmd\AppData\Local\GeoGebra_6\app-6.0.583\api-ms-win-core-shutdown-l1-1-1.dll
-----
C:\Users\rmd\AppData\Local\GeoGebra_6\app-6.0.583\api-ms-win-service-private-l1-1-1.dll
C:\Windows\System32\downlevel\api-ms-win-service-private-l1-1-1.dll
C:\Windows\SysWOW64\downlevel\api-ms-win-service-private-l1-1-1.dll
C:\Windows\WinSxS\amd64_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_6.3.9600.16384_none_b8233abb5511544f\api-ms-win-service-private-l1-1-1.dll
C:\Windows\WinSxS\x86_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_6.3.9600.16384_none_5c049f379cb3e319\api-ms-win-service-private-l1-1-1.dll

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by