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 commentaire

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?

Connectez-vous pour commenter.

 Réponse acceptée

Friedrich
Friedrich le 3 Fév 2012
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 commentaires

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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by