mexw64 function dynamically linked to .dll will not run w/out c compiler

2 ビュー (過去 30 日間)
ryan
ryan 2013 年 7 月 12 日
I am running an executable matlab program that is using a mexw64 function, which is linked to a .dll. It runs fine on my computer, and on some other machines (so i know its not a lnk error), but not on machines w/out a c/c++ compiler. Is there any way to use this mex function w/out a c compiler? or somehow combine the .dll with the mex into one mex function?
If no for both of these, does anyone have any idea how i can throw this mex in a try catch, and if it goes to catch(no c/c++ compiler installed), make it automatically download a free .net c++ compiler?

採用された回答

James Tursa
James Tursa 2013 年 7 月 12 日
Typically you don't need the C compiler itself installed, you only need the libraries, which are usually free to download and install.
  2 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 7 月 12 日
I agree with James. However, I wonder if you are compiling with Visual Studio. If so, you probably need to have the Visual Studio Redistributable Package (and not the compiler itself) available at runtime. You can't throw across the MEX interface to MATLAB, but I think you can have a try-catch block inside the MEX-function and return an error to MATLAB using mexErrMsgTxt.
ryan
ryan 2013 年 7 月 13 日
I Have installed both of the correct installers and it still does not work. Any idea why this may be?

サインインしてコメントする。

その他の回答 (1 件)

Ken Atwell
Ken Atwell 2013 年 7 月 13 日
It sounds like there is a dependency missing. Use Dependency Walker on the broken computer and see what it tells you.
Let us know if this helps or not.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by