.mexw64 is invalid

6 views (last 30 days)
ying wang
ying wang on 4 Oct 2011
We have successfully generated a mex file myfuncs.mexw32 from myfuncs.cpp in which OpenCV functions are called, with the following system configurations: Matlab R2010b, VS 2008 & windows Xp 32-bit. It works well. However, after switched to windows 7 64-bit, following the totally same procedure, even we were able to get myfuncs.mexw64 still with no errors and warnings, it can't be recognized by Matlab as an invalid mex file.
We have searched on net whether anybody once faced the similar problem. Someone said it is probably caused by that the CRT version used by OpenCV isn't consistent with what Matlab uses.
Does anybody can help me with this? I will really appreciate for your help.
  • By the way, does anybody know how to check the dependency of the libmex.dll?
  2 Comments
Jan
Jan on 4 Oct 2011
Please post the complete error message. It might contain useful details.
Kaustubha Govind
Kaustubha Govind on 4 Oct 2011
It would also be useful to run your MEX file through Dependency Walker (link in Jan's answer) to see what (if any) runtime libraries it can't find.

Sign in to comment.

Accepted Answer

Andreas Goser
Andreas Goser on 4 Oct 2011
Not a full answer, but a process to narrow down: Can you verify, if a simple MEX file, like the timestwo.c example from the documentation works as intended? If not, there is a more basic problem to solve.

More Answers (1)

Jan
Jan on 4 Oct 2011
Check the dependencies of the dll: http://www.dependencywalker.com/

Community Treasure Hunt

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

Start Hunting!