I want to convert my .mdl to .dll as I have to use it for Hyperworks Motionsolve.I built a simple model in simulink for example (involving 1 input, output port and 1 discrete statespace block), chose the following configuration parameters:
Type: fixed step
Solver:ode3(bogaki)
Target file : grt.tlc (create VC/C++ solution file for the grt target)
Language : C++
Make command : make_rtw
Template makefile :RTW.MSVCBuild
I chose the compiler as MS visual studio 2010 by the 'mex -setup' command in matlab command window. I use the windows 7 OS 32bit, Matlab R2011b
When the build button is selected, throws error -
Invoke error, dispatch exception
Source:Microsoft Visual Studio.Shell.10.0
Description: index
What might be the problem? Looking forward for your help

 採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 9 月 5 日

2 投票

My guess is that the "create VC/C++ solution file for the grt target" option causes Microsoft Visual Studio to be invoked via its COM interface in order to create the solution file, and it is likely your Visual Studio installation is not registered as a COM Server. What happens of you choose "grt.tlc - Generic Real-Time Target" instead? Also, when you ran mex -setup, was the utility able to locate your compiler automatically, or did you have to manually specify its path?

その他の回答 (1 件)

Akash
Akash 2012 年 9 月 5 日
編集済み: Akash 2012 年 9 月 5 日

0 投票

Kaustubha, Thank you for your last message. I used "grt.tlc - Generic Real-Time Target" and was able to generate an .exe file without getting error.
The mex -setup automatically located the compiler (MS VS 2010). Looking forward for your reply
Akash

3 件のコメント

Kaustubha Govind
Kaustubha Govind 2012 年 9 月 6 日
Akash: I don't know much about COM, but you might need to figure out why Visual Studio won't start as a COM Server. For a start, you may want to find the ProgID corresponding to your Visual Studio installation and try starting it from MATLAB using the actxserver command.
Arvind Pandey
Arvind Pandey 2013 年 3 月 20 日
Hi Kaustabha/Ashish We have a similar issue. we want to convert .mdl to .exe using grt_malloc.tlc with description of visual c/c++ option. Exe is getting generated but We are getting same above error(invoke error). we tried using "actxserver('visualstudio.DTE.10.0')" command as suggested by you. But unable to understand outcome, as we are still getting the error. Please suggest how to proceed & get rid the above error.
Kaustubha Govind
Kaustubha Govind 2013 年 3 月 21 日
Arvind: Please contact MathWorks Tech Support regarding this issue, I'm not sure how this can be resolved.

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by