|
|
mxGetNumberOfDimensions missing ?
Posted:
Oct 21, 2009 3:38 PM
|
|
Mac OSX 10.5.6 Matlab R2009a
gfortran/gcc
Code fragment:
subroutine mexFunction(nlhs, plhs, nrhs, prhs) use matlabmex
implicit none integer, intent(in) :: nlhs, nrhs integer, intent(in), dimension(:), pointer :: prhs integer, intent(out), dimension(:), pointer :: plhs
integer(i4b) :: l,m,n integer(i4b), pointer :: n1 integer(i4b), pointer :: A if(nrhs /= 2) then call mexErrMsgTxt('Function requires four input arguments.'); end if A = mxGetData(prhs(1)) n1 = mxGetDimensions(prhs(1)) end subroutine mexFunction
matlabmex.f90 contains:
integer (kind=4) function mxGetData(pm) use constants integer (kind=4) :: pm end function mxGetData
integer (kind=4) function mxGetDimensions(pm) use constants integer (kind=4) :: pm end function mxGetDimensions
integer(kind=4) function mxGetNumberOfDimensions(pm) use constants integer(kind=4) :: pm end function mxGetNumberOfDimensions
in the interface block.
Compilation:
/Applications/MATLAB2009a/MATLAB_R2009a.app/bin/mex -maci mexFunction.f90 Undefined symbols: "_mxgetdimensions_", referenced from: _mexfunction_ in mexFunction.o ld: symbol(s) not found collect2: ld returned 1 exit status
mex: link of ' "mexFunction.mexmaci"' failed.
It can find mxGetData() but not mxGetNumberOfDimensions()
I have checked my matlab documentation to confirm that the function exists.
|
|