I am new to C++, and I have troubles to get going. I want to re-implement a code, written in GNU Octave, using C++. I would, however, still want to use some GNU Octave functionality in that C++ code.
I have installed GNU Octave 4.0.0 on Ubuntu 14.04 LTS. My problem is that I can not even compile, since the 'octave/oct.h' is missing?
A simple code
#include <iostream>
#include <octave/oct.h>
using namespace std;
int main ()
{
Complex number = Complex(0, 1);
cout << number;
}
when compiled with g++ (4.8.4) produces:
"fatal error: octave/oct.h: Aucun fichier ou dossier de ce type #include compilation terminated.".
Thanks for your help.
Working with GNU Octave's own minimal example, you should be able to compile and run it without problems using
In order to be able to use
mkoctfile
, you need to install the liboctave-dev package