Error while generating dll
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
I'm trying to generate a dll from a simulink model using simulink coder for a multibody simulation software, MSc ADAMS. I'm using Matlab 2014b and have Visual Studio 2013 assigned as the compiler.
I get the following error while trying to create the dll.
cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4 -D_WINNT -D_WIN32_WINNT=0x0502 -DNTDDI_VERSION=0x05020000 -D_WIN32_IE=0x0600 -DWINVER=0x0502 -D_MT -MT -DRSIM_PARAMETER_LOADING /wd4996 /Od /Oy- |>DEFINES_CUSTOM<| -DMODEL=MaxFx_new -DHAVESTDIO -DNUMST=2 -DNCSTATES=0 -DNRT -DRSIM_WITH_SL_SOLVER MaxFx_new_data.c
"|" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
The make command returned an error of 2
Der Befehl "An_error_occurred_during_the_call_to_make" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Here is the complete build/error report.
### Starting build procedure for model: MaxFx_new
### Generating code into build folder: D:\Ablage\p153580_FordSbW\WorkDir\MaxFx_new_rsim_rtw
### Invoking Target Language Compiler on MaxFx_new.rtw
### Using System Target File: D:\Ablage\p153580_FordSbW\WorkDir\rsim.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file MaxFx_new.h
### Writing header file MaxFx_new_types.h
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
### Writing header file multiword_types.h
### Writing source file MaxFx_new.c
### Writing header file MaxFx_new_private.h
### Writing header file rtmodel.h
### Writing source file MaxFx_new_data.c
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing header file rt_defines.h
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### TLC code generation complete.
### Generating TLC interface API.
### Creating data type transition file MaxFx_new_dt.h
### Writing wrapper file adams.c
### .......done!
### Processing Template Makefile: D:\Ablage\p153580_FordSbW\WorkDir\rsim_vcx64.tmf
!-----
The following make variables are used in the template make file, but they are
not defined. You may have a mismatch between the system target file and the
template make file
= |>DEFINES_CUSTOM<|
-----!
### Creating MaxFx_new.mk from D:\Ablage\p153580_FordSbW\WorkDir\rsim_vcx64.tmf
### Building MaxFx_new: .\MaxFx_new.bat
D:\Ablage\p153580_FordSbW\WorkDir\MaxFx_new_rsim_rtw>call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCVARSALL.BAT " amd64
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
### Compiling MaxFx_new_data.c
cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4 -D_WINNT -D_WIN32_WINNT=0x0502 -DNTDDI_VERSION=0x05020000 -D_WIN32_IE=0x0600 -DWINVER=0x0502 -D_MT -MT -DRSIM_PARAMETER_LOADING /wd4996 /Od /Oy- |>DEFINES_CUSTOM<| -DMODEL=MaxFx_new -DHAVESTDIO -DNUMST=2 -DNCSTATES=0 -DNRT -DRSIM_WITH_SL_SOLVER MaxFx_new_data.c
"|" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
The make command returned an error of 2
Der Befehl "An_error_occurred_during_the_call_to_make" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
### Build procedure for model: 'MaxFx_new' aborted due to an error.
Error: Error(s) encountered while building model "MaxFx_new"
Could anyone please help me out? I can't figure out, why I'm unable to generate the dll
Thanks and Regards, Karthik
PS: I assume that the compilers are fine, as I was able to generate the dll with 2016b version
댓글 수: 1
Walter Roberson
2017년 9월 19일
The important part of the message is
The following make variables are used in the template make file, but they are
not defined. You may have a mismatch between the system target file and the
template make file
= |>DEFINES_CUSTOM<|
If the variable had been defined then the |>DEFINES_CUSTOM<| would have been replaced on the command line and there would not have been a compilation problem.
You might be able to edit D:\Ablage\p153580_FordSbW\WorkDir\rsim_vcx64.tmf to change that part.
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!