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 Kommentar

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?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Friedrich
Friedrich am 3 Feb. 2012

3 Stimmen

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 Kommentare

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!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Feb. 2012

Kommentiert:

am 6 Nov. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by