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
____________________________________________________________________
Connect with Capgemini:
Please consider the environment and do not print this email unless absolutely necessary.
Capgemini encourages environmental awareness.