Make sure mex-files are compatible with 64bit Matlab
See
http://de.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html