Hi everyone,
I’m currently trying to use TFFTReal for data processing. My data in held in Double_t *input samples and I included “TFFTReal.h” in my file.
I tried several declarations, or ways of creating a TFFTReal instance but I always get errors when compiling.
Here are 2 examples :
- If I try this :
TFFTReal fft;
fft.TFFTReal(n,kFALSE);
fft.Init("EX",+1,kind);
fft.SetPoints(input);
fft.Transform();
fft.GetPoints(output);
I get : error: invalid use of ‘class TFFTReal’ for the first line.
- If I try this :
TFFTReal fft = new TFFTReal(n,kFALSE);
fft.Init("EX",+1,kind);
fft.SetPoints(input);
fft.Transform();
fft.GetPoints(output);
I get :
error: invalid conversion from ‘TFFTReal*’ to 'Int_t’
error: initializing argument 1 of 'TFFTReal::TFFTReal(Int_t, Bool_t)'
also for the first line…
Could anyone give me a hint on what I’m missing (I guess I missed something stupid but I can’t find it…) ?
Best regards,
Sylvain Vayre.
Either … TFFTReal fft(n, kFALSE);
fft.Init("EX", +1, kind);
fft.SetPoints(input);
fft.Transform();
fft.GetPoints(output);
… or … TFFTReal *fft = new TFFTReal(n, kFALSE);
fft->Init("EX", +1, kind);
fft->SetPoints(input);
fft->Transform();
fft->GetPoints(output);
delete fft;
Ok.
So with the first solution, I still get errors :
qdc.c:(.text+0x752): undefined reference to `TFFTReal::TFFTReal(int, bool)'
qdc.c:(.text+0x769): undefined reference to `TFFTReal::Init(char const*, int, int const*)'
qdc.c:(.text+0x776): undefined reference to `TFFTReal::SetPoints(double const*)'
qdc.c:(.text+0x77f): undefined reference to `TFFTReal::Transform()'
qdc.c:(.text+0x791): undefined reference to `TFFTReal::GetPoints(double*, bool) const'
qdc.c:(.text+0x79a): undefined reference to `TFFTReal::~TFFTReal()'
qdc.c:(.text+0x7b3): undefined reference to `TFFTReal::~TFFTReal()'
collect2: ld returned 1 exit status
And with the second solution, I get one error :
qdc.c:(.text+0x75d): undefined reference to `TFFTReal::TFFTReal(int, bool)'
collect2: ld returned 1 exit status
I guess, there’s something missing here…
Thanks anyway !
Sylvain.
Looks like the linker is missing the libFFTW. To your linking command, try to add something like: `root-config --glibs` -lFFTW
That was it ! Thank you very much !
Sylvain.