title: C++ programs using Octave libraries
body: <p>I try to use in my c++ project libraries from Octave. 
  Unfortunately, I am not able to build program.
  I use Windows 7 64 bit, Octave3.6.4_gcc4.6.2 and gcc 4.6.2.</p>
  
  <p>My steps:</p>
  
  <ol>
  <li>Downloaded Octave3.6.4_gcc4.6.2.exe 
  (<a href="http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/Octave3.6.4_gcc4.6.2_20130408.7z/download" rel="nofollow">http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/Octave3.6.4_gcc4.6.2_20130408.7z/download</a>)</li>
  </ol>
  
  <p>Which I installed in C:\Octave. I have added the address of the bin folder of octave to the environmental variable PATH.</p>
  
  <ol start="2">
  <li><p>Downloaded mingw32-gcc-4.6.2-release-c,c++,fortran-sjlj-FINAL.7z
  and installed in C drive. I have added the address of the bin folder of mingw to the environmental variable PATH.</p></li>
  <li><p>Tried to compile simple example main.cpp (or example from <a href="http://www.gnu.org/software/octave/doc/interpreter/Standalone-Programs.html#Standalone-Programs" rel="nofollow">http://www.gnu.org/software/octave/doc/interpreter/Standalone-Programs.html#Standalone-Programs</a>)</p></li>
  </ol>
  
  <p>.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;octave/oct.h&gt;
  
  using namespace std;
  
  int main() {
  
    return 0;
  }
  </code></pre>
  
  <ol start="4">
  <li>I used makefile:</li>
  </ol>
  
  <p>.</p>
  
  <pre><code>OCTAVE_INCLUDE=C:\Octave\Octave3.6.4_gcc4.6.2\include\octave-3.6.4
  
  all: test
  
  clean:
      -rm test.o test
  
  test: test.o
      mkoctfile --link-stand-alone -o test test.o
  
  test.o: main.cpp
      g++ -c -I$(OCTAVE_INCLUDE) -I$(OCTAVE_INCLUDE)octave -o test.o main.cpp
  </code></pre>
  
  <p>So, we have </p>
  
  <p>hdf5.h: No such file or directory
  regex.h: No such file or directory</p>
  
  <p>but they are in C:\Octave\Octave3.2.4_gcc4.4.0\include\</p>
  
  <p>I do not understand where is my mistake.</p>