【问题标题】:Model acceleration in Matlab-Simulink (Mac OSX)Matlab-Simulink (Mac OSX) 中的模型加速
【发布时间】:2015-05-09 07:30:45
【问题描述】:

对于 Simulink 中的模型加速和模型引用技术的演示示例,我收到此构建错误。我在 Mac OSX 10.9.5 中使用 Matlab R2013b,并使用 Xcode 6.2/Clang++ 作为我的 C/C++ 编译器。该错误似乎是由于缺少/未知类型 char16_t。 similar issue was resolved by using CFLAGS -Dchar16_t=UINT16_T for Matlab compiler for Mac OSX。我对 matlab 编译器没有问题,但是编译 simulink 模型时出现构建错误(即在sbuild 函数中)。任何线索如何解决此构建错误?

### 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.

【问题讨论】:

    标签: c++ macos matlab clang simulink


    【解决方案1】:
    #include <stdint.h>
    

    是获得char16_t 声明的一种方式。如果您无法修改代码,则可以使用该文件的强制包含(检查编译器的文档以了解其强制包含选项是什么)。

    【讨论】:

      猜你喜欢
      • 2014-02-08
      • 1970-01-01
      • 2016-11-29
      • 2014-02-24
      • 1970-01-01
      • 2021-12-26
      • 1970-01-01
      • 1970-01-01
      • 2016-12-27
      相关资源
      最近更新 更多