VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Exist faults when using simulink to compile dll file

I use a right Configuration Environment to compile a model to .dll file, but I meet the following faults.If  I tick some option in Advanced parameters of Optimization,it can be compiled,but the module information is missing when importing the compiled model.What is this problem ?

 

Vehicle_Planetary_0705_IO.c(1) : warning C4005: “NI_VERISTAND_MAINMODELFILE”: 宏重定义 [2 similar]
命令行参数: 参见前面的“NI_VERISTAND_MAINMODELFILE”定义
Vehicle_Planetary_0705_IO.c(64918) : error C2059: 语法错误:“)”
Vehicle_Planetary_0705_IO.c(64923) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64928) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64933) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64938) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64943) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64948) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64953) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64958) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(64963) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(65408) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(65413) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(65418) : error C2059: 语法错误:“,”
Vehicle_Planetary_0705_IO.c(65418) : fatal error C1003: 错误计数超过 100;正在停止编译命令行参数: 参见前面的“NI_VERISTAND_MODELDATAFILE”定义
e:\aaa_hcu_hil_model\new_model\vehicle_planetary_0705_io_niveristand_rtw\Vehicle_Planetary_0705_IO.h... : error C2208: “real64_T”: 没有使用此类型进行定义的成员
### Compiling ni_modelframework.c cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_X86_=1 -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=0x05000000 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -D_MT -D_DLL -MD /wd4996 /fp:precise -Od /MD -DUSE_RTMODEL -DNI_ROOTMODEL_Vehicle_Planetary_0705_IO -DMODEL=Vehicle_Planetary_0705_IO -DRT -DNUMST=2 -DTID01EQ=1 -DNCSTATES=9 -DMT=0 -DHAVESTDIO -DNATIONAL_INSTRUMENTS_SIT -D_CRT_SECURE_NO_DEPRECATE ni_modelframework.c ni_modelframework.c
e:\aaa_hcu_hil_model\new_model\vehicle_planetary_0705_io_niveristand_rtw\Vehicle_Planetary_0705_IO.h... : error C2208: “real64_T”: 没有使用此类型进行定义的成员
 
### Aborted due to an error in the build procedure for model: Vehicle_Planetary_0705_IO
The call to NIVeriStand_make_rtw_hook, during the exit hook generated the following error:
    VeriStand: The build procedure failed to compile the model: Vehicle_Planetary_0705_IO. This might be the result of a failed linking or compile operation of the binary file.
 
For more information, refer to the error message generated in the MATLAB Command Window.
 
If MATLAB reports error LNK1123, make sure to apply all service packs and updates for your version of Microsoft Visual Studio or Windows SDK. For more information about this error, refer to Microsoft article KB2757355.
 
The build process will terminate as a result.
Caused by:
· VeriStand: The build procedure failed to compile the model: Vehicle_Planetary_0705_IO. This might be the result of a failed linking or compile operation of the binary file. For more information, refer to the error message generated in the MATLAB Command Window. If MATLAB reports error LNK1123, make sure to apply all service packs and updates for your version of Microsoft Visual Studio or Windows SDK. For more information about this error, refer to Microsoft article KB2757355.
 
 
 
0 Kudos
Message 1 of 2
(685 Views)

What specific advanced parameters are you enabling to successfully compile? I ask because there are large amounts of syntax errors, so those settings could help narrow down the issue. 

 

Related to syntax, VeriStand Model Framework requires that signal and parameter names use letter (uppercase or lowercase), digits, or underscores. Other characters can lead to syntax issues.

 

If you are using VeriStand 2021, I would recommend you consider using our new toolbox: https://www.mathworks.com/matlabcentral/fileexchange/106420-veristand-model-generation-support.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 2
(640 Views)