How do I get MCR to look for my MEX files in the current directory?

I have included a mex file with my deployed app, but when running the mexed function, I get the error:
"An error occurred: Invalid MEX-file 'C:\Users\username\AppData\blahblahblah...': The specified module could not be found."
But I don't want to put my MEX file there: I want it in the same directory as my executable, where it's sitting right now. How can I get MCR to see it? =/
Cheers!

댓글 수: 1

Hmm, actually I checked that directory and I see that it's just a cache. MCR copies in my MEX file even if I haven't supplied it, so I assume it's part of my deployed executable.
The file is sitting exactly where MCR says that it cannot be found.
Anybody know what might be going on?

댓글을 달려면 로그인하십시오.

 채택된 답변

Friedrich
Friedrich 2012년 2월 3일

3 개 추천

Hi,
this error means that some dependency of that mex file couldnt be found. This happens for example when you compile your mex files with VS 2010 express or SDK 7.1. They depend on the VS redistributable package 2010 which isn't shipped with the MCR.
So basically, install the redistributable package maching your compiler version and bitness.
In addition: If the MCR couldnt find your mex files, the error would be the unknown function or variable error.

댓글 수: 2

Thank you for that. It turns out I had only installed the x86 redistributables on my target machine. After installing the x64 package, the error went away =)
THANK YOU!
I've been searching many forums and running Dependency Walker to no avail. It turns out that the target machine simply needed SDK 7.1. Now my deployed software is running marvelously.
You made my day!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

2012년 2월 3일

댓글:

2013년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by