Using simulink to call c++ code via an s-function
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to duplicate this example: http://uk.mathworks.com/matlabcentral/answers/102682-how-can-i-generate-an-s-function-that-calls-a-c-static-library-with-other-library-dependencies I get the following error: Mult_lib.lib(mult_cpp.obj) : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z) referenced in function "void __cdecl deleteMult(void)" (?deleteMult@@YAXXZ) my_lib_adder_cpp.mexw32 : fatal error LNK1120: 1 unresolved externals Can you help please?
0 comentarios
Respuestas (1)
Pavithra Ashok Kumar
el 19 de En. de 2016
The issue may occur because of a mismatch in code settings. The library and associated header file should be included in both the Custom Code section for Simulation Target and under Code Generation. Simulation modes that use code generation (such as Accelerator mode) will still work as the Simulation Target includes are set up correctly.
Under the Code Generation -> Custom Code section, the option for "Use the same custom code settings as Simulation Target" can be selected. Hope this resolves your issue.
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!