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

 

https://visualidentity.capgemini.com/capgemini.png

____________________________________________________________________

Connect with Capgemini:

cid:image002.png@01D41855.E5D1B680cid:image003.png@01D41855.E5D1B680 cid:image004.png@01D41855.E5D1B680 cid:image005.png@01D41855.E5D1B680 cid:image006.png@01D41855.E5D1B680 cid:image007.png@01D41855.E5D1B680 cid:image009.png@01D41855.E5D1B680

 

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.