From: Robert on
"Kate J." <quisquiliae(a)hotmail.com> wrote in message <i3v59o$qmd$1(a)fred.mathworks.com>...
> Thanks for your input, Robert. I will take a look at the mdlInitializeSizes code in the mex file. However, I'm puzzled why this same, unaltered code would run fine on my previous PC, but now fail on the new one... weird.

Looks like you're still running an old dll. Running "which('controller_CMEXsfcn', '-ALL')" could possibly give a hint. If you run the newly built mex your matlab and mex-compiler installation must be fixed, see "Solution 1-2223MW" on the mathworks homepage:
http://www.mathworks.com/support/solutions/en/data/1-2223MW/?solution=1-2223MW

Cheers,

Robert
From: Steve Amphlett on
"Kate J." <quisquiliae(a)hotmail.com> wrote in message <i3v560$jkg$1(a)fred.mathworks.com>...
> To clarify my last post, here is my actual error message:
>
> Error while obtaining sizes from MEX S-function 'controller_CMEXsfcn' in 'Host_model/S-Function'. MATLAB error message:
>
> Invalid MEX-file 'C:\research_project\8-01-10\controller_CMEXsfcn.mexw32': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

It looks like your MEX file has dependencies that are not on the new computer. Most likely MSVC++ run-time libs. The mex function spews a warning about installing the right run-time libs on any machine that needs to load & run a MEX file.
From: Kate J. on
Thanks for your input, Steve. I used Dependency Walker to investigate the dependencies, and found 4 missing DLLs. I will try to figure out how to find these, as not all of them seem to be on my old PC's hard drive...
From: Steve Amphlett on
"Kate J." <quisquiliae(a)hotmail.com> wrote in message <i414fj$m1p$1(a)fred.mathworks.com>...
> Thanks for your input, Steve. I used Dependency Walker to investigate the dependencies, and found 4 missing DLLs. I will try to figure out how to find these, as not all of them seem to be on my old PC's hard drive...

You will need to find an appropriate vcredist_x86.exe or vcredist_x64.exe from the Microsoft website. The version you need will depend on what compiler version built your MEX file.

Here is a TMW technical solution for VS2005-compiled MEX files. It may not be the exact answer, but it is the same problem.

http://www.mathworks.com/support/solutions/en/data/1-2223MW/
First  |  Prev  | 
Pages: 1 2
Prev: simulate jump process
Next: high density scatterplot