Simulink Coder to Vector CANape Real-Time Target DLL causes error: "Reference to non-existent field 'ShortName'."

21 次查看(过去 30 天)
Hello,
I'm trying to buit code for Vector Canape out of my Simulink Model. No matter if I use my actual model or just a model containing a single sine wave generator and a scope, it is giving me the following error during the building:
"Reference to non-existent field 'ShortName'" (see Apprendix I, last line).
Im using...
  • Windows 8.1 64Bit,
  • Matlab 8.6.0.267246 (R2015b)
  • Simulink version: 8.6
  • CANape MATLAB Integration Package 13.0.0 (64 bit)
  • Visual Studio 2015
Code Generation...
  • Target File: cnp.tlc
  • Language C
Modell...
  • Sine wave generator and a scope
  • Start time 0.0 Stop time 1
  • Fixed time step 0.1
  • Solver ode3
Can anyone help me?
Apprendix I:
Generation 2 1 Elapsed: 32 sec ### Generating code into build folder: F:\01_Master_Thesis\06_Software\40_Simulink\02_V2\test_cnp_rtw Objectives unspecified. You must specify objectives in the Configuration Parameters > Code Generation pane before checking model. ### Invoking Target Language Compiler on test.rtw ### Using System Target File: C:\Program Files\MATLAB\R2015b\rtw\c\canape\cnp.tlc ### Loading TLC function libraries ### Initial pass through model to cache user defined code . ### Caching model source code ### Writing header file test.h . ### Writing header file test_types.h ### Writing header file rtwtypes.h ### Writing header file builtin_typeid_types.h ### Writing header file multiword_types.h ### Writing header file zero_crossing_types.h ### Writing source file test.c . ### Writing header file test_private.h ### Writing header file rtmodel.h ### Writing header file rt_nonfinite.h ### Writing source file rt_nonfinite.c ### Writing header file rt_defines.h ### Writing header file rtGetInf.h . ### Writing source file rtGetInf.c ### Writing header file rtGetNaN.h ### Writing source file rtGetNaN.c ### TLC code generation complete. ### Generating TLC interface API. . ### Creating ASAP2 file: test.a2l . ### Indenting ASAP2 file. . ### Processing Template Makefile: C:\Program Files\MATLAB\R2015b\rtw\c\canape\cnp_msdll.tmf Reference to non-existent field 'ShortName'.

回答(2 个)

Tesla.
Tesla. 2017-6-22
You need to install a compatible Visual C++ Professional compiler, for example Visual C++ Professional 2012 or 2015. The CANape Compiler accesses the Visual C++ compiler during the build.
Installing the trial version of Visual Studio Professional is sufficient to have access to the compiler.

Mark Zurawski
Mark Zurawski 2020-2-15
These are the patch files for MEX-file compilation, MATLAB Compiler, MATLAB Compiler SDK, Simulink Coder, Audio System Toolbox and Simulink Real-Time.
Depending on which products you are using, install the patches attached to the following Bug Reports:
MEX-file compilation, MATLAB Compiler and MATLAB Compiler SDK:
Simulink Coder:
Simulink Real-Time:
Audio System Toolbox:
Some of the file are not replace properly and may be the problem.
The below screen shot is the msvc2017.xml file

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by