Code generation from level-2 C S-function containing Lapack function calls on targetPC.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I try to compile a simulink model containing a level-2 C S-function on a speedgoat IO397. This S-function contains calls to the Lapack function dpotrs. I am able to use this S-function in Normal, Accelerator and Rapid Accelerator mode, however I fail to build a standalone executable in External mode.
I get the following error:
solve_chol_sfun.obj : error LNK2019: unresolved external symbol _dpotrs referenced in function _mdlOutputs
C:\PROGRA~1\MATLAB\R2018a\extern\lib\win64\microsoft\libmwlapack.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
Tflex_PIDv1_ISSGP18a_slrt.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x460'
As the error shows and warning show, the library I use seems to be of a different type than the target pc. However, I have no idea how to solve this, any suggestions?
Kind regards,
0 commentaires
Réponses (1)
Nick Sarnie
le 13 Juil 2019
Modifié(e) : Nick Sarnie
le 13 Juil 2019
Hi Wouter,
Based on the error message it looks like the shipped lapack library with MATLAB was compiled for a 64-bit binaru but Simulink Real-Time is creating a 32-bit binary, so it errors out.
My gut reaction is I don't think using Lapack functions is possible with SLRT because we don't generate code for the algorithm and only link against it, but please contact Technical Support for a complete answer.
Thanks,
Nick
0 commentaires
Voir également
Catégories
En savoir plus sur Simulink Coder dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!