Re: TFFTReal class. Does need non-standard libraries?

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Tue, 26 May 2009 18:44:12 +0200


Hello,

  for using the FFT classes directly in compiled code in a separate application you need to link with the fft library (libFFTW.so ).

For using it in interpreted mode you have to load first the library , just do :

gSystem->Load("libFFTW")

before calling the constructor.
Otherwise you can use the TVirtualFFTW interface, see   http://root.cern.ch/root/htmldoc/TVirtualFFT.html

in this case the library will be loaded automatically

  Best Regards

  Lorenzo

On May 26, 2009, at 5:02 PM, Lucio Anderlini wrote:

> Dear rooters,
> I need a FFT in a script, I found that there is a TFFTReal which
> should solve my problems but it does not work.
> I cannot call the constructor because if I do I get a compiler
> output like :
>
>
> Info in <TUnixSystem::ACLiC>: creating shared library /Applications/
> root/bin/../macros/LHCbMuon/simnoise_c.so
> /Applications/root/bin/../macros/LHCbMuon/simnoise.c: In function
> ‘void simnoise()’:
> /Applications/root/bin/../macros/LHCbMuon/simnoise.c:71: warning:
> unused variable ‘fft’
> dlopen error: dlopen(/Applications/root/bin/../macros/LHCbMuon/
> simnoise_c.so, 10): Symbol not found: __ZN8TFFTRealC1Eib
> Referenced from: /Applications/root/bin/../macros/LHCbMuon/
> simnoise_c.so
> Expected in: dynamic lookup
>
> Load Error: Failed to load Dynamic link library /Applications/root/
> bin/../macros/LHCbMuon/simnoise_c.so
> /Applications/root/bin/../macros/LHCbMuon/simnoise.c: In function
> ‘void simnoise()’:
> /Applications/root/bin/../macros/LHCbMuon/simnoise.c:71: warning:
> unused variable ‘fft’
> Undefined symbols:
> "_main", referenced from:
> start in crt1.10.5.o
> "TFFTReal::TFFTReal(int, bool)", referenced from:
> simnoise() in simnoise_c_ACLiC_dict.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> the simplest script giving me the error is just
>
> #include <TFFTReal.h>
> void simnoise (void)
> {
> TFFTReal *fft = new TFFTReal(100);
> }
>
>
> If I try to interpret the script I give the following output:
>
> Error: TFFTReal() declared but not defined /Applications/root/bin/../
> macros/LHCbMuon/simnoise.c:71:
>
>
> I'm a real beginner with root, but this seems to me like the lacking
> of a library. Have I to include something in some file of
> configuration to be able to use this package?
> Is it easier to do the fft with other tools? If yes which ones?
>
> Sorry if these informations were already somewhere, I looked for
> them but without any result.
>
> Thank you very much.
>
> Lucio.
>
> PS. I am using the version 5.22/00 of root, which should be the pro
> one, if I remember well.
Received on Tue May 26 2009 - 18:44:24 CEST

This archive was generated by hypermail 2.2.0 : Thu May 28 2009 - 17:50:02 CEST