can't find Matlab coder generated mexFunction

조회 수: 2 (최근 30일)
Jane Jean
Jane Jean 2012년 5월 2일
댓글: raym 2024년 11월 8일
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에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by