[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave to independent C code

From: david moloney
Subject: Re: octave to independent C code
Date: Fri, 29 Feb 2008 09:43:35 +0000
In our group we are currently working on a compiler for Octave. The
compiler translates Octave code to C++ code. The compiler is implemented
mostly in Stratego (see

It consists of the following packages:
  - octave-front, the front-end, containing parser etc.
  - octave-opt, the optimizer
  - octave-tc, the type checker/inferencer
  - octave2c, back-end

On Thu, Feb 28, 2008 at 6:59 PM, John W. Eaton <address@hidden> wrote:
On 28-Feb-2008, David Riano wrote:

| I wrote code in Matlab that I now need to
| redistribute as C-code to be combined with other C-code.
| I can not redistribute the matlab libraries for free.
| I was thinking to convert the Matlab code to
| Octave, but I want my program to run as well independently from Octave.
| So I was thinking to:
| 1. Convert M-code to Octave
| 2. Convert Octave code to C code. Is it possible?

Yes, but I think you have to do it by hand. I don't know of any
automatic Octave -> C/C++ translator.

| 3. Export the Octave libraries. How do you do that?

What do you mean by "export"?

| 4. Go to a computer without Octave installed,
| both Linux and Windows. Run gcc to compile my
| C-code with the octave libraries. Any hints?

| 5. Run my program in Linux/Windows without
| needing to have Octave or Matlab installed.

But your application would still be linked to the Octave libraries,
correct?  If so, then what are the license for your code?  If you link
with Octave's libraries, it must be GPL compatible.

Also, what is the "other C-code" you refer to above?

Finally, since Octave is free software, why not just stop at step 1 and
distribute Octave along with your code?

Help-octave mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]