Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compile( Error using mex) #12

Open
nikishyn opened this issue Jun 7, 2018 · 2 comments
Open

Error compile( Error using mex) #12

nikishyn opened this issue Jun 7, 2018 · 2 comments

Comments

@nikishyn
Copy link

nikishyn commented Jun 7, 2018

Good day!
When starts compile.m , I have compile error:

>> compile
Building with 'MinGW64 Compiler (C++)'.
Error using mex
D:\antispoofing\Matlab_spoofdet_hog_lbp_Gab__svm\feature-extraction-master\util\pixelwise_hog31.cc: In function 'mxArray* process(const mxArray*, const mxArray*)':
D:\antispoofing\Matlab_spoofdet_hog_lbp_Gab__svm\feature-extraction-master\util\pixelwise_hog31.cc:48:44: error: cannot convert 'const size_t* {aka const long long unsigned int*}' to 'const int*' in initialization
const int dims = mxGetDimensions(mximage);
^
D:\antispoofing\Matlab_spoofdet_hog_lbp_Gab__svm\feature-extraction-master\util\pixelwise_hog31.cc:81:72: error: cannot convert 'int
' to 'const size_t* {aka const long long unsigned int*}' for argument '2' to 'mxArray*
mxCreateNumericArray_730(size_t, const size_t*, mxClassID, mxComplexity)'
mxArray *mxfeat = mxCreateNumericArray(3, out, mxDOUBLE_CLASS, mxREAL);

@nikishyn
Copy link
Author

nikishyn commented Jun 7, 2018

mex -compatibleArrayDims util/pixelwise_hog31.cc '-outdir' 'util/';
mex -compatibleArrayDims features/ssim/vggSsim/MEXfindnearestl2.cpp '-outdir' 'features/ssim/vggSsim/';
mex -compatibleArrayDims features/ssim/vggSsim/mexFindSimMaps.cpp '-outdir' 'features/ssim/vggSsim/';
mex -compatibleArrayDims features/ssim/vggSsim/MEXkmeans_faster2.cpp '-outdir' 'features/ssim/vggSsim/';

Add -compatibleArrayDims in compile.m solved problem

@LY6421
Copy link

LY6421 commented Jan 11, 2020

Hi, NikishinRoman
I faced the same problem as you mentioned in the first message.

But I am not so sure how to handle this problem

If I need to copy the folllowing contents you mentioned in the second to mey MATKLAB comend windows? --- It still does not work after i tried!

mex -compatibleArrayDims util/pixelwise_hog31.cc '-outdir' 'util/';
mex -compatibleArrayDims features/ssim/vggSsim/MEXfindnearestl2.cpp '-outdir' 'features/ssim/vggSsim/';
mex -compatibleArrayDims features/ssim/vggSsim/mexFindSimMaps.cpp '-outdir' 'features/ssim/vggSsim/';
mex -compatibleArrayDims features/ssim/vggSsim/MEXkmeans_faster2.cpp '-outdir' 'features/ssim/vggSsim/';

hope your reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants