Using simulink to call c++ code via an s-function
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Pavithra Ashok Kumar
le 19 Jan 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 commentaires
Voir également
Catégories
En savoir plus sur Simulink Coder dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!