[srslte-users] Adding srslte static libaray Problem

Andre Puschmann andre.puschmann at softwareradiosystems.com
Thu Aug 10 08:09:59 UTC 2017


Hi,

beside to what Kewin suggested, you could also add another target and
build srslte_phy dynamically. Just check the CMakeLists.txt in the lib/phy.

Also check your libs, on my system, I link against fftw3f, here is my
CMake output:

..
-- FFTW3F LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- FFTW3F STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.a
..

Cheers
Andre



On 09.08.2017 21:03, Masoud Naderpour wrote:
> Hi.
> I could add srslte.so file to my empty c++ project in Eclipse IDE and I
> could write my own codes. But unfortunately in the new version the cmake
> does not generate one .so file but multiple of static libraries (.a
> files). I add the files but the above errors appear. In the prevo
> 
> On Wed, Aug 9, 2017, 01:41 Justin Tallon
> <justin.tallon at softwareradiosystems.com
> <mailto:justin.tallon at softwareradiosystems.com>> wrote:
> 
>     Hey Masoud!
> 
>     Could you attach all the cmake files you are using to compile this
>     project?
> 
>     Thanks!
>     Justin
> 
>     ____
>     Justin Tallon Ph.D.
> 
>     Software Radio Systems (SRS)
>     http://www.softwareradiosystems.com
>     <http://www.softwareradiosystems.com/>
> 
>     +353-86-067-0753 | justin.tallon at softwareradiosystems.com
>     <mailto:justin.tallon at softwareradiosystems.com>
> 
>     On Mon, Aug 7, 2017 at 12:44 PM, Masoud Naderpour
>     <naderpour.masoud at gmail.com <mailto:naderpour.masoud at gmail.com>> wrote:
> 
>         Yes, I did. But it was not helpful.
> 
> 
>         On Mon, Aug 7, 2017, 12:25 Kewin Rausch <krausch at fbk.eu
>         <mailto:krausch at fbk.eu>> wrote:
> 
>             Hi Masoud,
>             the order you use for linking usually matters when it comes
>             to C/C++ linkers.
>             Have you tried to put fftw library as the last one, after
>             all the srslte libraries?
> 
>             Cheers,
>             Kewin R.
> 
>             On Sun, Aug 6, 2017 at 7:42 AM, Masoud Naderpour
>             <naderpour.masoud at gmail.com
>             <mailto: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
>                 <mailto:srslte-users at lists.softwareradiosystems.com>
>                 http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
> 
> 
> 
>         _______________________________________________
>         srslte-users mailing list
>         srslte-users at lists.softwareradiosystems.com
>         <mailto:srslte-users at lists.softwareradiosystems.com>
>         http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
> 
> 
> 
> 
> _______________________________________________
> srslte-users mailing list
> srslte-users at lists.softwareradiosystems.com
> http://www.softwareradiosystems.com/mailman/listinfo/srslte-users
> 



More information about the srslte-users mailing list