error LNK2019 on Building in Matlab 2016b and veristand 2018SP1

2 ビュー (過去 30 日間)
alexandre colas
alexandre colas 2019 年 7 月 18 日
回答済み: Jonathan Berg 2020 年 4 月 24 日
Hello,
i try to compile an engine Model with Matlab 2016b and veristand 2018 SP1 so with the Windows SDK 7.1, for this i select the NIVeriStand.tlc file, and after the C language for the build.
and i have this error :
link /RELEASE /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll kernel32.lib ws2_32.lib mswsock.lib advapi32.lib @EP6FADTX_ATn8.lnk @EP6FADTX_ATn8_ref.rsp /dll -out:EP6FADTX_ATn8.dll
Creating library EP6FADTX_ATn8.lib and object EP6FADTX_ATn8.exp
EP6FADTX_ATn8.obj : error LNK2019: unresolved external symbol _fmin referenced in function _EP6FADTX_ATn8_DetectSat
EP6FADTX_ATn8.obj : error LNK2019: unresolved external symbol _fmax referenced in function _EP6FADTX_ATn8_DetectSat
EP6FADTX_ATn8.dll : fatal error LNK1120: 2 unresolved externals
### Created library : C:\User\Depot_banc_veristand\Depot_Bancs_VERISTAND\Sources_Matlab_I2Ex\MDL_Matlab_2016b\EP6FADTX_ATN8_V2\EP6FADTX_ATn8_niVeriStand_rtw\EP6FADTX_ATn8.dll
On the Net, i have found that with the windows SDK, i must use the C89/C90 code extension. Link
But in matlab i can not select this extension :
extensions.png
have you a solution to do my build correctly ?
slts

回答 (1 件)

Jonathan Berg
Jonathan Berg 2020 年 4 月 24 日
I had the same issue and found that the NI article (link) does not accurately describe where to find the option, at least not in Simulink R2016b that I'm using.
Here is where I found the C89/C90 option:
  1. Open the Simulink model's "Configuration Parameters"
  2. Click the "All Parameters" tab
  3. Scroll down to the section titled "Code Generation > Advanced parameters"
  4. Find option "Standard math library" and change it from "C99 (ISO)" to "C89/C90 (ANSI)"

カテゴリ

Help Center および File ExchangeAutomotive Applications についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by