MATLAB が特に BLAS および LAPACK ヘッダーを提供していることに気付きました。
$ ls ${MATLAB_DIR}/extern/include/
blas.h engine.h lapack.h mat.h mclmcr.h mex.h mwutil.h
blascompat32.h fintrf.h libmatlbm.mlib matrix.h mclmcrrt.h mwdebug.h tmwtypes.h
emlrt.h io64.h libmatlbmx.mlib mclcppclass.h mcr.h mwservices.h
コンパイルされたコードにそれらを使用したいので、次をコンパイルしようとしました:
ex_blas.c
#include <blas.h>
int main()
{
return 0;
}
次のコマンドを使用します。
$ mex ex_blas.c
しかし、これはエラーを返します:
In file included from ex_blas.c:1:
/Applications/MATLAB_R2009b.app/extern/include/blas.h:51: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:62: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:77: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:92: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:103: error: syntax error before ‘ptrdiff_t’
/Applications/MATLAB_R2009b.app/extern/include/blas.h:122: error: syntax error before ‘ptrdiff_t’
MATLABがblas.h
提供する は、MATLAB 外部のサードパーティ アプリケーションで使用できますか? はいの場合、上記のエラーの原因は何ですか?