help-octave
[Top][All Lists]
Advanced

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

Problems compiling dynamic loadable c files


From: Jens Becker
Subject: Problems compiling dynamic loadable c files
Date: Thu, 13 Nov 2003 04:34:34 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031009

Hi!
I want to replace a .m-file with the right-hand-side of a nonlinear diff.eq. by a c file to improve performance (for use with lsode).
I started with the example file oregonator.cc, that I compiled with
"mkoctfile oregonator.cc".
I get these errors:

oregonator.cc: In function `octave_value_list Foregonator(const octave_value_list&, int)': oregonator.cc:15: error: conversion from `Array<double>' to non-scalar type `ColumnVector' requested

My oregonator.cc-file is from the manual (I replace already the pow-command which makes problems...):

--
#include <octave/oct.h>

DEFUN_DLD (oregonator, args, ,
  "The `oregonator'.\n\
\n\
Reference:\n\
\n\
  Oscillations in chemical systems.  IV.  Limit cycle behavior in a\n\
  model of a real chemical reaction. Richard J. Field and Richard\n\
  M. Noyes, The Journal of Chemical Physics, Volume 60 Number 5,\n\
  March 1974.")
{
  ColumnVector dx (3);

  ColumnVector x = args(0).vector_value ();

  dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0) - 8.375e-06*x(0)*x(0));
  dx(1) = (x(2) - x(0)*x(1) - x(1)) / 77.27;
  dx(2) = 0.161*(x(0) - x(2));

  return octave_value (dx);
}
--

I have SuSE 8.2 Linux with Octave 2.1.44 (i686-pc-linux-gnu) and dynamic libraries enabled (rpm package by suse).

I am happy if somebody can help me!
Thanks!   Jens Becker
--

Oh, I don't blame Congress.  If I had $600 billion at my disposal, I'd
be irresponsible, too.
                -- Lichty & Wagner



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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