error: unknown type name 'mxArray'

12 次查看(过去 30 天)
Aubrey
Aubrey 2024-8-20
编辑: Aubrey 2024-8-30
I added non-inlined s-functions to a simulink model, built the code, and am now trying to generate a2l file.
I am running into these errors. In what file do I define the type names and how do I define them?
Thanks,
simstruc.h:: error: unknown type name 'mxArray'
simstruc.h:: error: unknown type name 'mxArray'
simstruc.h:: error: unknown type name '_ResolveVarFcn'
error: unknown type name '_ssFcnCallExecArgInfo'
simstruc.h:: error: unknown type name '_ssFcnCallExecArgInfo'
error: unknown type name '_ssFcnCallExecArgs'
imstruc.h: error: unknown type name 'SSSimulinkFunctionPtr'
  2 个评论
Malay Agarwal
Malay Agarwal 2024-8-22
编辑:Malay Agarwal 2024-8-22
Could you please share the Simulink model so that I can reproduce the issue? Please also share the steps you took to build the code and to generate the A2L file.
Aubrey
Aubrey 2024-8-29
I am unable to share the model due to confidentiality. The A2L file is generated using a custom software. I built the code using Simulink control b.

请先登录,再进行评论。

回答(1 个)

Udit06
Udit06 2024-8-26
编辑:Udit06 2024-8-26
Hi Aubrey,
You can refer to the following MATLAB answer which handles a similar issue:
The above answer suggests the following two approaches to resolve the issue:
  • Define the compile and link switches in your IDE based on the output of the Verbose build. You can refer to the following MathWorks documentation for more details related to the Verbose build:
  • The other suggestion was to inline the s function by wrapping it. You can refer to the following MathWorks documentation to understand more about wrapper S-functions.
You can get the R2017b release specific documentations using the following command on your MATLAB command window:
>> doc('Wrap User Code with TLC')
>> doc('Verbose build')
I hope this helps.
  2 个评论
Aubrey
Aubrey 2024-8-29
编辑:Aubrey 2024-8-29
Is there any sort of further training available or examples for generating a TLC file? The documentation has not helped to write the .tlc file. I would like to inline noninlined s-functions if possible.
Aubrey
Aubrey 2024-8-30
编辑:Aubrey 2024-8-30
Ok I found access to the tutorials in a different location.
I am primarily looking for information on how to generate the .TLC file as described here. https://www.mathworks.com/help/rtw/tlc/wrapping-user-code-with-tlc.html
I have a sfunction (X) with files X.c, X.h, X.mex. These were created using Simulink subsystem, right click, C, Generate S function.
In the example, there are two c files referenced, my_alg.c and wrapsfcn.c, no header. Is my S function X equivalent to wrapsfcn.c and wrapsfcn.mex, or do I need to copy my X.c to change_wrapsfcn.tlc as shown in the example?
Basically, is change_wrapsfcn.tlc a generic template where I need to add my C code from X.c to create the X.tlc? If not, where do I start for my .tlc file with X.c, X.h, and X.mex?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Target Language Compiler 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by