Why do I get a compile error with my S-Function Builder generated S-Function with the Simulink Coder?
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 1 de Abr. de 2014
Editada: MathWorks Support Team
el 28 de Feb. de 2019
I have a Simulink model containing an S-Function that has been generated with the S-Function Builder.
I am trying to compile this model with the Simulink Coder.
The build throws the following error:
testsfun2.obj : error LNK2019: unresolved external symbol test1_Outputs_wrapper referenced in function testsfun2_step
..\testsfun2.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.EXE"' : return code '0x460'
Respuesta aceptada
MathWorks Support Team
el 28 de Feb. de 2019
The error message shows that the file 'test1_wrapper.c' cannot be found by the compiler.
This file is generated by the S-Function Builder and contains C-code that is called by the S-Function. The S-Function Builder automatically includes this wrapper file in the compilation of the generated code.
However, in your case, you are trying to use a simple S-Function block to call this S-Function. This block does not “know” that there is a wrapper file somewhere.
You need manually to add this C-file as additional source file in the configuration parameters under “Code Generation->Custom Code” in order to compile this model.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!