title: Octave and SWIG. mkoctfile complains: unrecognized argument
body: <p>I am in the process of writing a lightweight Octave binding to Quantlib, using SWIG and mkoctfile. I am following the documentation found on the SWIG and Octave homepage.</p>
  
  <p>From the SWIG documentation:</p>
  
  <blockquote>
    <p><strong>27.2.1 Compiling a dynamic module</strong></p>
    
    <p>Octave modules are DLLs/shared objects having the ".oct" suffix.
    Building an oct file is usually done with the mkoctfile command
    (either within Octave itself, or from the shell). For example,</p>
    
    <p>$ swig -octave -c++ example.i -o example_wrap.cxx $ mkoctfile
    example_wrap.cxx example.c</p>
    
    <p>where example.c is the file containing the gcd() implementation.</p>
  </blockquote>
  
  <p>These are the files I have so far:</p>
  
  <ul>
  <li>my SWIG interface file quantlib-octave.i</li>
  <li>my function implementations quantlib-octave.cpp</li>
  <li>a glue wrapper file generated using SWIG: quantlib-octave_wrap.cxx</li>
  </ul>
  
  <p>This is the CLI output when I invoked mkoctfile:</p>
  
  <blockquote>
    <p>root@yourbox:~/src/quantlib-octave$ mkoctfile quantlib-octave_wrap.cxx
    quantlib-octave.cpp mkoctfile: unrecognized argument
    quantlib-octave_wrap.cxx</p>
  </blockquote>
  
  <p>The help information displayed when I type <code>mkoctfile -h</code> is not very useful.</p>
  
  <p>Does anyone know why mkoctfile is complaining?</p>
  
  <p><strong>Version Info</strong></p>
  
  <pre><code>SWIG Version 2.0.4
  Compiled with g++ [x86_64-unknown-linux-gnu]
  Configured options: +pcre
  
  mkoctfile, version 3.6.0
  
  Octave: 3.6.0
  </code></pre>