I'm trying to create a struct as an output of a MEX file, but when I try to compile the file, I get errors about the function mxCreateStructMatrix not being defined. The exact error is:
Error: Function ‘mxcreatestructmatrix730’ at (1) has no IMPLICIT type; did you mean ‘mxcreatedoublematrix730’?
It would seem that the library that defines mxCreateStructMatrix isn't being linked, but I don't know which library is supposed to define the function. My library string from
LINKLIBS : -Wl,-rpath-link,/usr/local/MATLAB/R2019b/bin/glnxa64 -L"/usr/local/MATLAB/R2019b/bin/glnxa64" -lmx -lmex -lmat -lm -L"/usr/lib64" -lgfortran
My guess is that the library is supposed to be defined by "-lmx," but ld is able to find the library without a problem. What could cause the function not to have a type defined?