[Top][All Lists]

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

oct files

From: John W. Eaton
Subject: oct files
Date: Tue, 12 Apr 2011 12:30:35 -0400

On 12-Apr-2011, Victor Hanby wrote:

| I'm looking at including some legacy code (f77 and C) component models  
| into an Octave simulation. The compilation into .oct files seems  
| pretty straightforward but nearly all my models call other functions/ 
| subroutines which return values such as thermodynamic properties.
| I can't figure out how to accommodate this, any advice would be much  
| appreciated.

You can compile multiple files with mkoctfile:

  mkoctfile sub1.c sub2.f objectfile.o -lmylib

or you can use it like a compiler linker:

  mkoctfile -c
  mkoctfile -c sub1.c
  mkoctfile -c sub2.f
  mkoctfile mainfunction.o sub1.o sub2.o objectfile.o -lmylib

Or are you asking how to call Fortran and C functions from the
function you define with DEFUN in the main C++ file that you use to
define the function that Octave can call?


reply via email to

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