Couldn't compile c files in MATLAB_R2012b and OS X 10.12.6 El Capitan

조회 수: 5 (최근 30일)
Marsge
Marsge 2017년 1월 12일
Hi everyone,
I try to compile c files in MATLAB_R2012b, but I couldn't. It releases an error when I try mex hello.c for example. The error likes:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
In file included from hello.c:1:
In file included from /Applications/MATLAB_R2012b.app/extern/include/mex.h:58:
In file included from /Applications/MATLAB_R2012b.app/extern/include/matrix.h:294:
/Applications/MATLAB_R2012b.app/extern/include/tmwtypes.h:819:9: error: unknown type name 'char16_t'
typedef char16_t CHAR16_T;
^
1 error generated.
mex: compile of ' "hello.c"' failed.
Error using mex (line 206)
Unable to complete successfully.
I try to get gcc version, it is
gcc (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I try which gcc, it is
/usr/local/bin/gcc
Meanwhile, I try whereis gcc, it is
/usr/bin/gcc
I attach the mexopts.sh file below. Could anyone let me know how to fix that problem. Thank you very much!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by