I noticed that MATLAB provides BLAS and LAPACK headers among others:
$ 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
I would like to use them for my compiled code, so I tried to compile the following:
ex_blas.c
#include <blas.h> int main() { return 0; }
with the following command:
$ mex ex_blas.c
But this returns an error:
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'
Is blas.h provided by MATLAB for use by a third-party application outside MATLAB? If so, what causes the error above?
blas matlab
jelil Nov 14 '09 at 23:35 2009-11-14 23:35
source share