Code generation from level-2 C S-function containing Lapack function calls on targetPC.

2 Ansichten (letzte 30 Tage)
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,

Antworten (1)

Nick Sarnie
Nick Sarnie am 13 Jul. 2019
Bearbeitet: Nick Sarnie am 13 Jul. 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

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by