error: unknown type name 'mxArray'

9 vues (au cours des 30 derniers jours)
Aubrey
Aubrey le 20 Août 2024
Modifié(e) : Aubrey le 30 Août 2024
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 commentaires
Malay Agarwal
Malay Agarwal le 22 Août 2024
Modifié(e) : Malay Agarwal le 22 Août 2024
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 le 29 Août 2024
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.

Connectez-vous pour commenter.

Réponses (1)

Udit06
Udit06 le 26 Août 2024
Modifié(e) : Udit06 le 26 Août 2024
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 commentaires
Aubrey
Aubrey le 29 Août 2024
Modifié(e) : Aubrey le 29 Août 2024
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 le 30 Août 2024
Modifié(e) : Aubrey le 30 Août 2024
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?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Target Language Compiler dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by