justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

Eyelink mxCreateStructArray error with mglPrivateEyelinkEDFRead.c #22

Closed rtraghavan closed 6 years ago

rtraghavan commented 7 years ago

I'm having a problem compiling mglPrivateEyelinkEDFRead.c

I get the following warnings.

mex -f /Volumes/Seagate_2TB/clang_maci64.xml -Dchar16_t=uint16_T mglPrivateEyelinkEDFRead.c Building with 'Xcode with Clang'. /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:91:35: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] plhs[0] = mxCreateStructArray(1,outDims,14,fieldNames); ^~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t *dims, int nfields, const char fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:159:57: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,"gazeLeft",mxCreateStructArray(1,outDims2,9,fieldNamesGaze)); ^~~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t *dims, int nfields, const char *fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:180:58: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,"gazeRight",mxCreateStructArray(1,outDims2,9,fieldNamesGaze)); ^~~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t dims, int nfields, const char fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:203:58: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,"fixations",mxCreateStructArray(1,outDimsFix,4,fieldNamesFix)); ^~~~~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t *dims, int nfields, const char fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:216:57: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,"saccades",mxCreateStructArray(1,outDimsFix,7,fieldNamesSac)); ^~~~~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t *dims, int nfields, const char *fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:235:55: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,"blinks",mxCreateStructArray(1,outDimsBlinks,2,fieldNamesBlinks)); ^~~~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t dims, int nfields, const char fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:252:61: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,mglFieldname,mxCreateStructArray(1,outDims,6,fieldNamesMGL)); ^~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t *dims, int nfields, const char *fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:259:61: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxSetField(plhs[0],0,mglFieldname,mxCreateStructArray(1,outDims,6,fieldNamesMGL)); ^~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t dims, int nfields, const char fieldnames); ^ /Volumes/Seagate_2TB/mgl/mgllib/mglEyelink/mglPrivateEyelinkEDFRead.c:266:52: warning: incompatible pointer types passing 'int [2]' to parameter of type 'const size_t ' (aka 'const unsigned long ') [-Wincompatible-pointer-types] mxArray messagesStruct = mxCreateStructArray(2, outDimsMessages, 2, fieldNamesMessages); ^~~~~~~ /Applications/MATLAB9.2.app/extern/include/matrix.h:961:52: note: passing argument to parameter 'dims' here mxCreateStructArray_730(size_t ndim, const size_t dims, int nfields, const char fieldnames);

Apparently you can't pass a vector to outdims? Any thoughts?