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

compilation fails: cannot convert ‘const mwSize*’ #8

Open
mixmixmix opened this issue Nov 19, 2019 · 2 comments
Open

compilation fails: cannot convert ‘const mwSize*’ #8

mixmixmix opened this issue Nov 19, 2019 · 2 comments

Comments

@mixmixmix
Copy link

gcc 8.3.0
GNU Octave, version 5.1.0

I wonder if there is a chance of it working in Octave? Compilation fails for me on something seemingly unrelated:

octave:1> compile
compiling features.cc
internal/features.cc: In function ‘mxArray* process(const mxArray*, const mxArray*, int, double)’:
internal/features.cc:47:44: error: cannot convert ‘const mwSize*’ {aka ‘const long int*’} to ‘const int*’ in initialization
   const int *dims = mxGetDimensions(mximage);
                                            ^
internal/features.cc:67:45: error: cannot convert ‘int*’ to ‘const mwSize*’ {aka ‘const long int*’}
   mxArray *mxfeat = mxCreateNumericArray(3, out, mxDOUBLE_CLASS, mxREAL);
                                             ^~~
In file included from /nix/store/p8nq32wkmicdmak782g5i90s7rvrkgc4-octave-5.1.0/include/octave-5.1.0/octave/mex.h:65,
                 from internal/features.cc:2:
/nix/store/p8nq32wkmicdmak782g5i90s7rvrkgc4-octave-5.1.0/include/octave-5.1.0/octave/mexproto.h:146:68: note:   initializing argument 2 of ‘mxArray* mxCreateNumericArray(mwSize, const mwSize*, mxClassID, mxComplexity)’
                                                      const mwSize *dims,
                                                      ~~~~~~~~~~~~~~^~~~
warning: mkoctfile: building exited with failure status
compiling spams
source: error sourcing file '/home/mix/repos/ihog/spams/compile.m'
error: called from
    compile at line 11 column 1
    run at line 71 column 7
    compile at line 11 column 1
@mixmixmix mixmixmix changed the title compilation fails cannot convert ‘const mwSize*’ compilation fails: cannot convert ‘const mwSize*’ Nov 19, 2019
@sanjeevx007
Copy link

Same observation using Octave 5.2.0

@Nosferath
Copy link

Same observation using MATLAB R2018a on Ubuntu 18.04 and gcc 7.5.0

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