Hi all,
I'm new to Octave. I want to use some function in Octave using C++ API.
When I follow the tutorial
https://octave.org/doc/interpreter/Standalone-Programs.html (A.3), I
encounter an invalid type conversion problem.
The compiler shows that:
Severity Code Description Project File Line Suppression
State
Error C2440 'static_cast': cannot convert from 'octave_idx_type *' to 'long
*' TestOctaveStandAlone
c:\octave\octave-4.4.0\include\octave-4.4.0\octave\dim-vector.h 156
The problem is located in oct-refcount.h, for the functions:
OCTAVE_ATOMIC_INCREMENT, OCTAVE_ATOMIC_DECREMENT,
OCTAVE_ATOMIC_POST_INCREMENT, OCTAVE_ATOMIC_POST_DECREMENT, in which a
variable x is converted from octave_idx_type* to long*.
How can I resolve the problem?
I'm using VS2017, the compiler configuration is Debug, x64.
The Octave version is 4.4.0.