Errors compiling a C++ class that includes Octave

John W. Eaton jwe at bevo.che.wisc.edu
Tue Jul 22 20:14:39 CDT 2008


On 22-Jul-2008, Kyusik Chung wrote:

| If the documentation on the libraries were clearer (or existed), that  
| would help.

The Octave libraries were designed to implement the Octave
interperter.  Anything beyond that is a bonus, I guess.  If people
want better documentation for the internals, then I suggest that
someone write and contribute something.

| I have the following line of code so far:
| 	Matrix m = Matrix(10, 10);

That's it?  No main()?  No include statements?

| Aside from creating the matrix, I do no other operations.
| 
| I have the following include statement:
| 	#include <octave/Matrix.h>

Where?

| In my Make file I have the following in my CXXFLAGS:
| 	-I /usr/local/include/octave-3.0.1
| 
| I would include some other headers if I could find reasonable  
| documentation telling me what needed to be included.

The following works for me:

  $ cat foo.cc
  #include <octave/config.h>
  #include <octave/Matrix.h>

  int
  main (void)
  {
    Matrix m (10, 10);

    return 0;
  }

  $ mkoctfile --link-stand-alone foo.cc
  $ ./a.out

jwe


More information about the Help-octave mailing list