help-octave
[Top][All Lists]
Advanced

[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 08:28:48 -0700 (PDT)

Well, at first thank you very much!

I'm trying to implement to that and since it doesn't work I stick to a basic
try:

                DEFUN_DLD (helloworld, args, nargout,"Hello World Help String")
                {

                }

from
https://www.gnu.org/software/octave/doc/v4.0.1/Getting-Started-with-Oct_002dFiles.html
already doesn't work. I receive the following:

address@hidden:~/analysis/analyse_tree/Filter$ make clean && make
rm -f filter *.o 
g++ -c -I/usr/include/octave-4.0.2/octave -g -Wall `root-config --cflags
--libs` -fPIC -O3 -pthread -std=c++11 -Wno-deprecated-declarations -m64
-I/home/user/root/include Filter.cpp -o Filter.o
-I/home/user/analysis/analyse_tree/Filter 
In file included from /usr/include/octave-4.0.2/octave/defun-dld.h:30:0,
                 from /usr/include/octave-4.0.2/octave/oct.h:36,
                 from Filter.cpp:5:
Filter.cpp: In function ‘int main()’:
/usr/include/octave-4.0.2/octave/defun-int.h:101:10: error: expected
unqualified-id before string constant
   extern "C" \
          ^
/usr/include/octave-4.0.2/octave/defun-int.h:98:3: note: in expansion of
macro ‘DEFINE_FUNX_INSTALLER_FUN’
   DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc)
   ^
/usr/include/octave-4.0.2/octave/defun-dld.h:61:3: note: in expansion of
macro ‘DEFINE_FUN_INSTALLER_FUN’
   DEFINE_FUN_INSTALLER_FUN (name, doc) \
   ^
Filter.cpp:303:3: note: in expansion of macro ‘DEFUN_DLD’
   DEFUN_DLD (helloworld, FADC2_ev18_crystal_12, nargout,"Hello World Help
String")
   ^
Filter.cpp:444:1: error: expected ‘}’ at end of input
 }
 ^
Filter.cpp:257:9: warning: unused variable ‘Outputfile_filtered’
[-Wunused-variable]
  TFile *Outputfile_filtered=new TFile(outputfile_filter, "RECREATE");         
// Outputfile
         ^
Filter.cpp:444:1: error: expected ‘}’ at end of input
 }

Without DEFUN_DLD it works. The description says that the first argument of
DEFUN_DLD has to be name of the function within octave. But as it is an
example it should work though (despite it does not work, too, by changin
helloworld to fft).

What am I doing wrongly?
Thank you in advance!



--
View this message in context: 
http://octave.1599824.n4.nabble.com/how-to-use-fft-in-c-tp4683590p4683621.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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