[英]Model acceleration in Matlab-Simulink (Mac OSX)
I get this build error for a demo example in Simulink for model acceleration and Model referencing technique. 我在Simulink中的演示示例中遇到了有关模型加速和模型引用技术的构建错误。 I use Matlab R2013b in Mac OSX 10.9.5 and use Xcode 6.2/Clang++ as my C/C++ compiler.
我在Mac OSX 10.9.5中使用Matlab R2013b,并使用Xcode 6.2 / Clang ++作为我的C / C ++编译器。 The error seems to be due to a missing/unknown type char16_t.
该错误似乎是由于缺少/未知的char16_t类型引起的。 The similar issue was resolved by using CFLAGS
-Dchar16_t=UINT16_T
for Matlab compiler for Mac OSX . 通过将CFLAGS
-Dchar16_t=UINT16_T
用于Mac OSX的Matlab编译器,可以解决类似的问题 。 I don't have issue with matlab compiler, but get the build error with compilation of simulink models (ie in sbuild
function). 我没有与matlab编译器有关的问题,但是在simulink模型的编译中(即在
sbuild
函数中)出现了构建错误。 Any clue how to resolve this build error? 任何线索如何解决此构建错误?
### Build procedure for model: 'sldemo_mdlref_counter' aborted due to an error.
### Model reference SIM target (sldemo_mdlref_counter_msf.mexmaci64) for model sldemo_mdlref_counter is out of date because sldemo_mdlref_counter_msf.mexmaci64 does not exist.
### Updating model reference SIM target for model: sldemo_mdlref_counter
xcrun clang -arch x86_64 -c -fno-common -fexceptions -O0 -DNDEBUG -DMODEL=sldemo_mdlref_counter -DNUMST=1 -DNCSTATES=0 -DUNIX -DMAT_FILE=0 -DINTEGER_CODE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DHAVESTDIO -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DMDL_REF_SIM_TGT=1 -I. -I../../.. -I/Applications/MATLAB_R2013a.app/extern/include -I/Applications/MATLAB_R2013a.app/simulink/include -I/Applications/MATLAB_R2013a.app/rtw/c/src -I/Applications/MATLAB_R2013a.app/rtw/c/src/ext_mode/common -I. -I/Users/santanusarma/Dropbox/M.TECH\ project/code/model -I../../../slprj/sim/_sharedutils "sldemo_mdlref_counter.c"
In file included from sldemo_mdlref_counter.c:2:
In file included from ./sldemo_mdlref_counter_capi.h:4:
In file included from ./sldemo_mdlref_counter.h:4:
In file included from /Applications/MATLAB_R2013a.app/rtw/c/src/rtw_modelmap.h:33:
In file included from ../../../slprj/sim/_sharedutils/rtwtypes.h:13:
/Applications/MATLAB_R2013a.app/extern/include/tmwtypes.h:819:9: error: unknown type
name 'char16_t'
typedef char16_t CHAR16_T;
^
1 error generated.
gmake: *** [sldemo_mdlref_counter.o] Error 1
### Build procedure for model: 'sldemo_mdlref_counter' aborted due to an error.
#include <stdint.h>
is one way to get a declaration of char16_t
. 是获取
char16_t
声明的一种方法。 If you can't modify the code then you could use a forced include of that file (check compiler's documentation for what its option for forced include is). 如果您无法修改代码,则可以使用该文件的强制包含(有关强制包含的选项,请参见编译器的文档)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.