### Failed to generate all binary outputs.Hi, I am generating Code for a model in MATLAB 2015b using Simulink and facing the following error. Plz help!

7 vues (au cours des 30 derniers jours)
## Generating code into build folder: C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw
### Invoking Target Language Compiler on DM1_SDP.rtw
### Using System Target File: c:\Matlab2015b\rtw\c\grt\grt.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file DM1_SDP.h
### Writing header file DM1_SDP_types.h
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
### Writing header file multiword_types.h
### Writing source file DM1_SDP.c
.
### Writing header file DM1_SDP_private.h
### Writing header file rtmodel.h
### Writing source file DM1_SDP_data.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing header file rtGetInf.h
.
### Writing source file rtGetInf.c
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### TLC code generation complete.
### Using toolchain: Microsoft Windows SDK v7.1 | nmake (64-bit Windows)
The precompiled library 'c:\Matlab2015b\toolbox\rtw\targets\xpc\target\build\xpcblocks\lib\xpccanac2104_vcx64.lib' does not exist. Generating makefile rules to build the library.
### 'C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw\DM1_SDP.mk' is up to date
### Building 'DM1_SDP': nmake -f DM1_SDP.mk all
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>call "setup_mssdk71.bat"
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set COMPILER=cl
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set COMPFLAGS=/c /GR /W3 /EHs /nologo /MD -I"c:\Matlab2015b\extern\include" -I"c:\Matlab2015b\simulink\include" /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set OPTIMFLAGS=/O2 /Oy- /DNDEBUG
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set DEBUGFLAGS=/Z7
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set LINKER=link
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set LINKFLAGS=/nologo /manifest /export: /DLL /LIBPATH:"c:\Matlab2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:mexFunction
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set LINKDEBUGFLAGS=/debug /PDB:".mexw64.pdb"
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set NAME_OUTPUT=/out:""
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set PATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin;;;c:\Matlab2015b\bin\win64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Matlab2015b\runtime\win64;c:\Matlab2015b\bin;c:\Matlab2015b\polyspace\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Users\A332822\AppData\Local\Microsoft\WindowsApps;
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set INCLUDE=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE\gl;c:\Matlab2015b\extern\include;;
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set LIB=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Lib\X64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;c:\Matlab2015b\lib\win64;c:\Matlab2015b\extern\lib\win64;
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>set LIBPATH=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\LIB\X64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;c:\Matlab2015b\extern\lib\win64;
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>cd .
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>if "" == "" (nmake -f DM1_SDP.mk all ) else (nmake -f DM1_SDP.mk )
Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4 -D_WINNT -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=0x05000000 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -D_MT -MT -D_CRT_SECURE_NO_WARNINGS /Od /Oy- -DMAT_FILE=1 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DTID01EQ=0 -DMODEL=DM1_SDP -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -Fo"DM1_SDP.obj" "C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw\DM1_SDP.c"
DM1_SDP.c
c:\vnl700_gw\vnldm_sdp\dm1_sdp_grt_rtw\DM1_SDP.h(25) : fatal error C1083: Cannot open include file: 'xpcimports.h': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\cl.EXE"' : return code '0x2'
Stop.
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\VNL700_GW\VNLDM_SDP\DM1_SDP_grt_rtw>An_error_occurred_during_the_call_to_make
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Build procedure for model: 'DM1_SDP' aborted due to an error.
Error(s) encountered while building "DM1_SDP":
### Failed to generate all binary outputs.
Component: Simulink | Category: Model error

Réponses (1)

Dimitri MANKOV
Dimitri MANKOV le 3 Jan 2022
Hi K,
The relevant line in your message is the following:
### Using System Target File: c:\Matlab2015b\rtw\c\grt\grt.tlc
This error message is most likely caused by a wrong configuration of the Code Generation settings in your Simulink model which is not compatible with Simulink Real-Time (which I assume you are using based on the rest of your message). The system target file must be set to “slrt.tlc” in MATLAB R2020a or earlier / "slrealtime.tlc" in MATLAB R2020b and later. The extension “tlc” stands for Target Language Compiler, which is an integral part of the Simulink Coder™ code generator. By selecting “slrt.tlc” or "slrealtime.tlc", you are instructing Simulink Coder™ to generate C/C++ code that is compatible, customized and optimized for Simulink Real-Time™.

Catégories

En savoir plus sur General Applications dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by