Code generation from level-2 C S-function containing Lapack function calls on targetPC.
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Nick Sarnie
2019-7-13
编辑:Nick Sarnie
2019-7-13
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!