[srslte-users] Adding srslte static libaray Problem

Kewin Rausch krausch at fbk.eu
Mon Aug 7 07:54:28 UTC 2017

Hi Masoud,
the order you use for linking usually matters when it comes to C/C++
Have you tried to put fftw library as the last one, after all the srslte

Kewin R.

On Sun, Aug 6, 2017 at 7:42 AM, Masoud Naderpour <naderpour.masoud at gmail.com
> wrote:

> Dear All,
> In the previous version of the srslte (the one without srsenb) I could add
> the srslte.so library to my empty Eclipse project and theretofore use the
> functionality of the srslte. In the new version (the one with srsenb)  the
> compilation process have been changed somehow. The CMake does not generate
> one file but multiple files and most of them not shred library but static
> one. I have added srslte_rf_utils.a, , srslte_phy.a, srslte_common.a,
> srslte_rf.so and fftw3.so in the project and the linker can find them. But
> when I compile the code the compiler prints the following errors:
>  ++ -L/home/naderpour/srsLTE/build/lib/src/phy/rf
> -L/home/naderpour/srsLTE/build/lib/src/phy -L/home/naderpour/srsLTE/build/lib/src/common
> -o "Ji"  ./Ja.o   -lsrslte_rf_utils -lsrslte_rf -lfftw3 -lsrslte_phy
> -lsrslte_common
> /home/naderpour/srsLTE/build/lib/src/phy/libsrslte_phy.a(dft_fftw.c.o):
> In function `srslte_dft_plan_c':
> dft_fftw.c:(.text+0x21): undefined reference to `fftwf_malloc'
> dft_fftw.c:(.text+0x2d): undefined reference to `fftwf_malloc'
> dft_fftw.c:(.text+0x4b): undefined reference to `fftwf_plan_dft_1d'
> /home/naderpour/srsLTE/build/lib/src/phy/libsrslte_phy.a(dft_fftw.c.o):
> In function `srslte_dft_plan_r':
> dft_fftw.c:(.text+0xb1): undefined reference to `fftwf_malloc'
> dft_fftw.c:(.text+0xbd): undefined reference to `fftwf_malloc'
> dft_fftw.c:(.text+0xda): undefined reference to `fftwf_plan_r2r_1d'
> /home/naderpour/srsLTE/build/lib/src/phy/libsrslte_phy.a(dft_fftw.c.o):
> In function `srslte_dft_run_c':
> dft_fftw.c:(.text+0x1d7): undefined reference to `fftwf_execute'
> dft_fftw.c:(.text+0x306): undefined reference to `fftwf_execute'
> /home/naderpour/srsLTE/build/lib/src/phy/libsrslte_phy.a(dft_fftw.c.o):
> In function `srslte_dft_run_r':
> dft_fftw.c:(.text+0x400): undefined reference to `fftwf_execute'
> /home/naderpour/srsLTE/build/lib/src/phy/libsrslte_phy.a(dft_fftw.c.o):
> In function `srslte_dft_plan_free':
> dft_fftw.c:(.text+0x799): undefined reference to `fftwf_free'
> dft_fftw.c:(.text+0x7a7): undefined reference to `fftwf_free'
> dft_fftw.c:(.text+0x7b5): undefined reference to `fftwf_destroy_plan'
> /home/naderpour/srsLTE/build/lib/src/phy/libsrslte_phy.a(dft_fftw.c.o):
> In function `srslte_dft_run_c_zerocopy':
> dft_fftw.c:(.text+0x185): undefined reference to `fftwf_execute_dft'
> collect2: error: ld returned 1 exit status
> make: *** [Ji] Error 1
> Obviously fftw is in fftw3.so and is aded to the project and the compler
> find it successfully. In fact when change the order of the added libraries
> some other errors also appear!. I would be thankful If you get me out of
> the trouble.
> Thanks,
> Masoud.
> _______________________________________________
> srslte-users mailing list
> srslte-users at lists.softwareradiosystems.com
> http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.softwareradiosystems.com/pipermail/srslte-users/attachments/20170807/8203c7bb/attachment.html>

More information about the srslte-users mailing list