[Top][All Lists]

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

Re: how to use fft in c++

From: Progressive
Subject: Re: how to use fft in c++
Date: Fri, 9 Jun 2017 10:54:11 -0700 (PDT)

Ok, thanks again! That's nice!

But I still don't get it..   I reduced the code to figure out the problem:

#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <math.h> 

#include <oct.h>
#include <builtin-defun-decls.h>
// #include <toplev.h>

using namespace std;

int main()

        DEFUN_DLD(testfft, args, nargout, "\testfft\n\")
                octave_value_list retval;
                int nargin = args.length ();

                retval = Ffft (args);
                return retval;

        return 1;

and get:

address@hidden:~/analysis/analyse_tree/Filter/Octave$ mkoctfile warning: missing terminating " character [enabled by default]
  DEFUN_DLD(testfft, args, nargout, "\testfft\n\")
                                    ^ error: unterminated argument list invoking macro "DEFUN_DLD"
 ^ In function ‘int main()’: error: ‘DEFUN_DLD’ was not declared in this scope
  DEFUN_DLD(testfft, args, nargout, "\testfft\n\")
  ^ error: expected ‘;’ at end of input error: expected ‘}’ at end of input

I have no idea any more. The only difference I notice is, that I include
#include <oct.h> instead of #include <octave/oct.> but the latter does not
work. And with the former I can at least do calculations and so on - but not
calling functions.
I would highly appreciate any help!

Pantxo wrote
> 2017-06-09 18:19 GMT+02:00 Progressive [via Octave] <

> address@hidden

>> Thanks, I will try this out directly.
>> But before that another question: I need to include CERN ROOT and I guess
>> it is not possible via mkoctfile?
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> tp4683590p4683623.html
>> To unsubscribe from how to use fft in c++, click here
>> &lt;;node=4683590&amp;code=cGFudHhvLmRpcmliYXJuZUBnbWFpbC5jb218NDY4MzU5MHwtNTYyMDk1Nzc5&gt;
>> .
>> &lt;;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml&gt;
> Yes you can. The most basic usage of mkoctfile is to make it a replacement
> for gcc/g++. In fact since it is a wrapper around gcc/g++ most of the
> flags
> you would pass to gcc can be passed to mkoctfile. Just forget about Octave
> specific flags/options since they will be included by default.
> Pantxo
> PS: you can also use your stadard g++ command and  generate Octave
> specific
> flags with e.g. `mkoctfile -p ALL_CFLAGS` (see mkoctfile --help)

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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