Use of the rtl-sdr library

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

GUERINOT, Justin justin.guerinot at capgemini.com
Mon Apr 1 14:58:11 UTC 2019


Hello,

I am trying to develop a simple application using rtlsdr's library functions as simple as rtlsdr_get_device_count().
But, at the moment of compilation GCC is unable to find the reference to the function and exit the errors :
« Undefinded reference to the function rtlsdr_get_device_count() ; »
« ld returned 1 exit status »

My code is below :

#include <stdio.h>
#include <stdlib.h>
#include «/usr/include/rtl-sdr.h »

int main(int argc, char *argv[])
{
              int device_count ;
              device_count = rtlsdr_get_device_count() ;
              printf(« Device ID : %d », device_count) ;
              return 0 ;
}

That sounds normal because source code and headers files are dispatched in different files and not compiled.
A solution would be to copy each headers, each sources together and compile them. But it should take a lot of times...

It should exists another solution but I don't find it.

For example, in the acarsdec software, how the developer was able to compile his software ?

I hope I well explained my issue,

Thank you in advance for your help

Best regards,

____________________________________________________________________
Justin Guérinot
Intern | Capgemini Digital Engineering & Manufacturing Services


Capgemini France | Toulouse
Mob.: + 33 6 33 77 14 32
www.capgemini.com<http://www.capgemini.com/>

[https://visualidentity.capgemini.com/capgemini.png]
____________________________________________________________________
Connect with Capgemini:
[cid:image002.png at 01D41855.E5D1B680]<https://www.capgemini.com/insights-and-resources/blogs>[cid:image003.png at 01D41855.E5D1B680]<https://www.twitter.com/capgemini> [cid:image004.png at 01D41855.E5D1B680] <https://www.facebook.com/capgemini>  [cid:image005.png at 01D41855.E5D1B680] <https://www.linkedin.com/company/capgemini>  [cid:image006.png at 01D41855.E5D1B680] <https://www.youtube.com/capgeminimedia>  [cid:image007.png at 01D41855.E5D1B680] <https://www.slideshare.net/capgemini>  [cid:image009.png at 01D41855.E5D1B680] <https://plus.google.com/+CapgeminiGlobal>

Please consider the environment and do not print this email unless absolutely necessary.
Capgemini encourages environmental awareness.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4046 bytes
Desc: image001.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 608 bytes
Desc: image002.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 515 bytes
Desc: image003.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 425 bytes
Desc: image004.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 488 bytes
Desc: image005.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 450 bytes
Desc: image006.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 649 bytes
Desc: image007.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 564 bytes
Desc: image008.png
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190401/4d7c95e4/attachment-0007.png>


More information about the osmocom-sdr mailing list