cvondrick / ihog

Visualizing Object Detection Features. ICCV 2013
http://mit.edu/vondrick/ihog
Other
223 stars 128 forks source link

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

Open mixmixmix opened 4 years ago

mixmixmix commented 4 years ago

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
sanjeevx007 commented 4 years ago

Same observation using Octave 5.2.0

Nosferath commented 3 years ago

Same observation using MATLAB R2018a on Ubuntu 18.04 and gcc 7.5.0