Closed alexpattyn closed 6 years ago
Seems to be a problem with this section of mmclab.cpp:
#if (! defined MX_API_VER) || (MX_API_VER < 0x07300000)
typedef int dimtype; //! MATLAB before 2017 uses int as the dimension array
#else
typedef size_t dimtype; //! MATLAB after 2017 uses size_t as the dimension array
#endif
Instead of a custom typedef, this should be using mwSize
, which is declared by both Matlab and Octave to represent the integer used for array sizes. In Octave 4.2 and older, mwSize
was int
, but in Octave 4.4, mwSize
is now int64_t
.
@mtmiller So just go ahead and change
#if (! defined MX_API_VER) || (MX_API_VER < 0x07300000)
typedef int dimtype; //! MATLAB before 2017 uses int as the dimension array
#else
typedef size_t dimtype; //! MATLAB after 2017 uses size_t as the dimension array
#endif
to ...
#if (! defined MX_API_VER) || (MX_API_VER < 0x07300000)
mwSize int dimtype; //! MATLAB before 2017 uses int as the dimension array
#else
mwSize size_t dimtype; //! MATLAB after 2017 uses size_t as the dimension array
#endif
Sorry I am not too familiar with writing C/C++.
@koenigjaeger Answered with #17.
OS: Fedora Silverblue 28 CPU: AMD® Ryzen 5 1600 six-core processor × 12 GPU: Radeon RX 580 Series (POLARIS10 / DRM 3.26.0 / 4.18.8-200.fc28.x86_64, LLVM 6.0.1) With GNU Octave 4.4.1
See: https://github.com/flathub/org.octave.Octave/issues/33
From the provided link it seems like there is an error making mmc.mex with octave 4.4.1 when running
system(make oct)
From within Octave.