embedding octave - floating point exception
Marco Driusso
marcodriusso at gmail.com
Mon Mar 9 16:25:54 CDT 2009
Running my program under gdb, after some functions that end correctly, I get
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb5d176c0 (LWP 15573)]
octave_ieee_init () at lo-ieee.cc:86
86 if (tmp_inf == tmp)
Current language: auto; currently c++
Have you any idea?
Thanks for the answer!
Marco
2009/3/9 John W. Eaton <jwe at octave.org>
On 9-Mar-2009, Marco Driusso wrote:
>
> | I'm embedding the octave interpreter in a c++ program. I convert my c++
> | variables to strings to pass them to octave (using the eval_string
> function
> | like explained in the octave_embed.tar.gz example) and I take them back
> | writing a file from octave and reading it from c++.
> | I have to use the gcc compiler and not the mkoctfile (like is done the
> | example) because I'm embedding octave in a big program that has an huge
> | Makefile, so what I do is just to modify this makefile adding the needed
> | libs.
> | Once compiled and linked (no problems doing that), I run my program and
> just
> | after called the octave_main(int argc, char*[]argv,int embedded) function
> I
> | have a floating point exception.
> | In the octave manual I read that if octave crashes immediately with a
> | floating point exception it could be that octave fail to initialize the
> | IEEE floating point values for infinity and NaN.
> | But octave run correctly on my system, I've not such error when I run it
> | normally from a shell.
> | Does anyone have an idea to solve this problem?
>
> Did you try running your program under a debugger to see precisely
> where it is crashing?
>
> jwe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090309/e3cdc27b/attachment.html
More information about the Help-octave
mailing list