help-octave
[Top][All Lists]
Advanced

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

Re: liboctave crash


From: Juan Pablo Carbajal
Subject: Re: liboctave crash
Date: Fri, 27 Jul 2012 15:58:41 +0200

On Fri, Jul 27, 2012 at 1:38 PM, bob <address@hidden> wrote:
> Hi,
>
> I am trying to run this small code:
>
> #include <iostream>
> #include <octave/oct.h>
>
> using namespace std;
>
> int main()  {
>     ComplexMatrix A = ComplexMatrix(2,2);
>     return 0;
> }
>
> Using octave-3.6.2 (MinGW), I am able to build the file. But when I run it,
> I get a seg-fault:
>
> Program received signal SIGSEGV, Segmentation fault.
> In libstdc++-6!_ZNKSs7_M_dataEv () (C:\MinGW\bin\libstdc++-6.dll)
>
> Even using:
>
> mkoctfile --link-stand-alone <file>
>
> I get the same crash.
>
> System: WinXP SP2 (32bit), Core 2 Duo
>
> Any help ?
> --
> bob
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>

You have tu use the dynamically loaded function macro. This is an
example form the manual
http://www.gnu.org/software/octave/doc/interpreter/Getting-Started-with-Oct_002dFiles.html

#include <octave/oct.h>

     DEFUN_DLD (helloworld, args, nargout,
       "Hello World Help String")
     {
       int nargin = args.length ();
       octave_stdout << "Hello World has " << nargin
             << " input arguments and "
             << nargout << " output arguments.\n";
       return octave_value_list ();
     }



-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

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