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

Cannot compile MATLAB 2019a #50

Open
violetbrina opened this issue Mar 24, 2019 · 4 comments
Open

Cannot compile MATLAB 2019a #50

violetbrina opened this issue Mar 24, 2019 · 4 comments

Comments

@violetbrina
Copy link

toolboxCompile fails for certain files. It cannot successfully compile due to this error:

Building with 'Xcode Clang++'.
-> COMPILE FAILURE: 'gradientMex.cpp' /Users//Library/Application Support/MathWorks/MATLAB Add-Ons/Collections/pdollar_toolbox/pdollar-toolbox-e873326/channels/private/gradientMex.cpp:329:20: error: no matching function for call to 'mxSetDimensions_730'
mxSetData(M,*I); mxSetDimensions(M,dims,3); return M;
^~~~~~~~~~~~~~~
/Applications/MATLAB_R2019a.app/extern/include/matrix.h:248:25: note: expanded from macro 'mxSetDimensions'
#define mxSetDimensions mxSetDimensions_730
^~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2019a.app/extern/include/matrix.h:1234:1: note: candidate function not viable: no known conversion from 'const int [3]' to 'const mwSize *' (aka 'const unsigned long *') for 2nd argument
mxSetDimensions(mxArray *pa, const mwSize *pdims, mwSize ndims);
^
/Applications/MATLAB_R2019a.app/extern/include/matrix.h:248:25: note: expanded from macro 'mxSetDimensions'
#define mxSetDimensions mxSetDimensions_730
^
/Users//Library/Application Support/MathWorks/MATLAB Add-Ons/Collections/pdollar_toolbox/pdollar-toolbox-e873326/channels/private/gradientMex.cpp:339:50: error: assigning to 'const int *' from incompatible type 'const mwSize *' (aka 'const unsigned long *')
nDims = mxGetNumberOfDimensions(pr[0]); dims = mxGetDimensions(pr[0]);
^~~~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2019a.app/extern/include/matrix.h:244:25: note: expanded from macro 'mxGetDimensions'
#define mxGetDimensions mxGetDimensions_730

@ardiya
Copy link

ardiya commented Jun 14, 2019

@violetbrina I'm compiling octave code, but the error seems similar. So, here's how I fixed mine in Octave ardiya@b5ec83f.

@1069066484
Copy link

@violetbrina Hi, have you fixed the problem. I have the same problem, too. I did as @ardiya said, but I got a new problem when testing the example codes by invoking imResample. The error said the required memory is too large and the program failed. Any suggestion? I suppose it is because lengths of data types mismatches when performing conversion, but I cannot solve it.

@fangfcg
Copy link

fangfcg commented Sep 14, 2020

solved by laurentkneip/opengv#53 (comment)

@hpf9017
Copy link

hpf9017 commented Jan 2, 2021

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

5 participants