help-octave
[Top][All Lists]
Advanced

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

Re: octave in c++ , attachment of standalone


From: Kai Torben Ohlhus
Subject: Re: octave in c++ , attachment of standalone
Date: Wed, 28 Aug 2013 00:01:49 +0200

On Tue, Aug 27, 2013 at 6:04 PM, Hans-Jürgen Greif <address@hidden> wrote:

Hello,

 

 

I want to program octave statement in c++. The first simple example is B=fft2(A). The problem in c++ file return variable B( ComplexMatrix)

 

Where to put B

 

a) in octave_value_list args or in statement

 

b) B = do_fft2(args,"fft2",0 );

 

 

In both cases I get compiler errors.

 

Please help.

 

Sincerely

 

Hans

 

----

Hans-Jürgen Greif

Fraunhofer-IOSB

Gutleuthausstr. 1

76275 Ettlingen

Germany

----

 


_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave


Hello Hans,

I assume you want to use Octave as a library for building a standalone program calling the fft2 function in it, without starting Octave itself. A good starting point for this case is this section of the manual (and the surrounding ones):
https://www.gnu.org/software/octave/doc/interpreter/Standalone-Programs.html#Standalone-Programs

According to this I modified your program (see attachment). It compiles and runs on my machine (Ubuntu 13.04, Octave 3.7.6+) with:
mkoctfile --link-stand-alone standalone.cc -o standalone

I don't understand, why you copied many Octave functions from the source in it, especially the DEFUN_DLD macros are usually for OCT-files, you can run from Octave itself, what I assume you don't want to do.

HTH,
Kai

Attachment: standalone.cc
Description: Binary data


reply via email to

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