[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 try.cc
try.cc:17:36: warning: missing terminating " character [enabled by default]
DEFUN_DLD(testfft, args, nargout, "\testfft\n\")
^
try.cc:33:0: error: unterminated argument list invoking macro "DEFUN_DLD"
^
try.cc: In function ‘int main()’:
try.cc:17:2: error: ‘DEFUN_DLD’ was not declared in this scope
DEFUN_DLD(testfft, args, nargout, "\testfft\n\")
^
try.cc:17:2: error: expected ‘;’ at end of input
try.cc:17:2: error: expected ‘}’ at end of input
address@hidden:~/analysis/analyse_tree/Filter/Octave$
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:
>> http://octave.1599824.n4.nabble.com/how-to-use-fft-in-c-
>> tp4683590p4683623.html
>> To unsubscribe from how to use fft in c++, click here
>> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4683590&code=cGFudHhvLmRpcmliYXJuZUBnbWFpbC5jb218NDY4MzU5MHwtNTYyMDk1Nzc5>
>> .
>> NAML
>> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
> 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:
http://octave.1599824.n4.nabble.com/how-to-use-fft-in-c-tp4683590p4683627.html
Sent from the Octave - General mailing list archive at Nabble.com.
- how to use fft in c++, Progressive, 2017/06/07
- Re: how to use fft in c++, Carlo De Falco, 2017/06/08
- Re: how to use fft in c++, Pantxo, 2017/06/08
- Re: how to use fft in c++, Progressive, 2017/06/09
- Re: how to use fft in c++, Pantxo, 2017/06/09
- Re: how to use fft in c++, Progressive, 2017/06/09
- Re: how to use fft in c++, Pantxo, 2017/06/09
- Re: how to use fft in c++,
Progressive <=
- Re: how to use fft in c++, Kire Pudsje, 2017/06/09
- Re: how to use fft in c++, Progressive, 2017/06/09
- Re: how to use fft in c++, Przemek Klosowski, 2017/06/09
- Re: how to use fft in c++, Progressive, 2017/06/12
- Re: how to use fft in c++, Kire Pudsje, 2017/06/09
- Re: how to use fft in c++, Pantxo, 2017/06/11
Re: how to use fft in c++, Andreas Weber, 2017/06/08