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

there some problems when compile edgesDetectMex.cpp #23

Open
youmi-zym opened this issue Jun 12, 2018 · 6 comments
Open

there some problems when compile edgesDetectMex.cpp #23

youmi-zym opened this issue Jun 12, 2018 · 6 comments

Comments

@youmi-zym
Copy link

Hi, I have a trouble when I compile the edgesDetectMex.cpp within Matlab.
There are some errors about the type of variable pointers.
Just as below:

mex private/edgesDetectMex.cpp -outdir private
Building with 'MinGW64 Compiler (C++)'.
Error using mex
E:\Users\User\Documents\Projects\edge\edges-master\private\edgesDetectMex.cpp: In function 'void
mexFunction(int, mxArray**, int, const mxArray**)':
E:\Users\User\Documents\Projects\edge\edges-master\private\edgesDetectMex.cpp:99:63: error: cannot convert
'const 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)'
pl[0] = mxCreateNumericArray(3,outDims,mxSINGLE_CLASS,mxREAL);
^
E:\Users\User\Documents\Projects\edge\edges-master\private\edgesDetectMex.cpp:101:63: error: cannot convert
'const 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)'
pl[1] = mxCreateNumericArray(3,indDims,mxUINT32_CLASS,mxREAL);
^
E:\Users\User\Documents\Projects\edge\edges-master\private\edgesDetectMex.cpp:103:71: error: cannot convert
'const 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)'
if(nl>2) pl[2] = mxCreateNumericArray(5,segDims,mxUINT8_CLASS,mxREAL);
^

What should I do to ignore these errors? Is there anyone encounter the same problems?
Thanks

@purva98
Copy link

purva98 commented Jun 13, 2018

yes, I also faced the same problem.
If you find a solution please share it with me
Thanks

@youmi-zym
Copy link
Author

youmi-zym commented Jun 14, 2018

I modify the 4 cpp file where it gets an error.
for example, in edgesDetectMex.cpp, it originally defines int, but I change it to size_t, after modify, the final looklike is :
`
const size_t imgDims[3] = {h,w,Z};

const size_t chnDims[3] = {h/shrink,w/shrink,nChns};

const size_t indDims[3] = {h1,w1,nTreesEval};

const size_t outDims[3] = {h2,w2,1};

const size_t segDims[5] = {gtWidth,gtWidth,h1,w1,nTreesEval};

`

@youmi-zym
Copy link
Author

private.zip

@youmi-zym
Copy link
Author

Above is the 4 cpp file I have modified

@purva98
Copy link

purva98 commented Jun 14, 2018

perfect , thanks

@Ribcomes
Copy link

come on somebody to help me out!!!!

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

3 participants