Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Help! Mex file does not work! Thanks a lot!

Subject: Help! Mex file does not work! Thanks a lot!

From: Antony

Date: 30 Jul, 2010 15:35:20

Message: 1 of 1

Dear all, I have implemented a MEX file with VC.net 2005. It is compiled and linked successfully in VC but I can not test it succesfully with MATLAB. Every time when I try to call the mex function, I get an error saying something like "Invalid MEX-file <mexfilename>: The specified module could not be found".

   According to the Documentation of MATLAB, I checked the problem with Dependency Walker and I got two warnings that 'libmx.dll' and 'cxcore200d.dll' ( I use OpenCV in the code and it is a OpenCV library, *-*). Then I copied these two libraries to my MATLAB project directory, but the above error appeared again. I also tried to add the directories to these two libraries to the MATALB Path, but failed again with the same error notice.

  Rightnow, I don't have any idea on how to cope with this problem. Please could you give me some advice on how to remove this problem so that I can run the MATLAB program with the MEX file? And what is the exact reason leading to this problem? Thanks a lot for your kind help!

 Antony

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us