[srslte-users] Fwd: srsLTE API

Kewin Rausch krausch at fbk.eu
Thu Dec 7 07:55:08 UTC 2017


Dear Fateme,

I think you should read the details of what an API (Application Programming
Interface) is.
An API is just a set of functionalities offered by a piece of software (a
library in this case); this mean that srsLTE library is offering to you
functionalities which abstract over PHY processing of radio signal for LTE
technologies.

Instead of writing down every time the how to process raw signal, for
example, you can call a routine of such library to have it doing the job
for you (assuming it is doing the job in the right way). The software which
uses such library is also isolated from the library change/updates, if the
API is maintained the same. This means you can replace a single DLL or SO
file without having to recompile the software which uses it.

SRSLTE_API in particular is a pre-processor symbol which abstracts over two
things: architecture and what I call "direction".

Architecture because the library can run over different operating
systems(Linux and windows) and compiled with different compilers(GCC and
probably MSBuild), and they can define the "direction" part in different
way.
Direction because when you compile the library you want to *export *these
functionalities, in order to be used by someone else, while when you write
a software you want to *import *them.

This is probably what is happening to you in Windows: you are trying to
compile a software which import this library and uses such API without the
right configuration.

Try to undefine the SRSLTE_DLL_EXPORTS symbol; this way the default
behavior of the software is going for the importing path, which ends up
using __declspec(dllimport), telling the compiler to use the procedures
exported by the library.
You are trying to compile a software which uses exported functions without
telling the compiler to resolve these procedures using srsLTE library.

Cheers,
Kewin

On Wed, Dec 6, 2017 at 11:34 PM, Fateme Rezaee <fateme.rezaee1368 at gmail.com>
wrote:

>
> Dear all
> I have a question a bout the codes written in different manners for
> srsLTE. For instance, in the codes which is written for physical layer,
> some of the functions, structure and enums have srsLTE  API in their
> declarations in the header files, and some of them do not. What is the
> different between functions with srsLTE API in their definitions with the
> ones which do not have this? To the best of my knowledge, APIs are used to
> access to a limit functions of a program... what about srsLTE API?
> As I run a piece of srsLTE code in windows error happens with the
> functions which have srsLTE API in their declarations, the error is: the
> function is defined without dll import....
> what is the usage or the meaning of srsLTE API in the srslte codes?
> Thanks in advance...
>
>
>
>
> --
> ************************************************************
> *******************
>
>
> Best regards,
>
> Fatemeh.Rezaei
>
> Ph.D. Student in Communication Systems Engineering
>
> Department of Electrical and Computer Engineering, Yazd University
>
> Yazd, Iran
>
> ************************************************************
> *******************
>
>
> _______________________________________________
> 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: <https://lists.srsran.com/pipermail/srsran-users/attachments/20171207/fe7c3d65/attachment.htm>


More information about the srsran-users mailing list