[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SWIG for Octave: Octave-SWIG.
From: |
John W. Eaton |
Subject: |
SWIG for Octave: Octave-SWIG. |
Date: |
Sat, 4 Jun 2005 00:17:53 -0400 |
[The sources list is for posting actual source code. For discussions,
please use the help or maintainers lists. --jwe]
On 3-Jun-2005, Muthiah Annamalai wrote:
| Hello there!
| Ive been thinking, and tried [lazily]
| to port SWIG [www.swig.org] to Octave.
Yes, that might be a good thing to do. But have you looked at
matwrap?
| USE CASE:
| ========
| With SWIG, "building" binding is easy like this.
|
| 1: Write a library.i file for that 'library' you need
| to port.
| emacs library.i /usr/include/library/* &
|
| 2: Run SWIG on it.
| swig -octave library.i
|
| 3: Compile it to a library.oct file.
| mkoctfile library.cc
|
| 4: Presto! use it in Octave.
| octave -q test_library.m
Yes, something like this can get you going quickly, but for languages
like Octave, a thin wrapper to C code is not always the best
interface. For that, you will likely still have to do more work
unless the interface definition contains more information than you
would find in a C header file for the given library.
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------