Page 1 of 1

Errors when using API example 'play_sdr.c'

Posted: Mon Jun 18, 2018 2:55 pm
by yxs728
Hi All,

I am trying to get raw IQ data from two RSP2 devices simultaneously. At beginning, I used sdr source block on gnuradio, it can work well when receive data from one device, but cannot receive two signal from two devices at the same time. Then I tried to use Pothosflow, but it cannot identify my device when I plugged usb cable into my MacBook. Finally, I turn to use API trying to get the raw data directly. I find the API example 'play_sdr.c' on sdrplay github page and try to compile it in Xcode, but some confused errors com up (please see blow). Does anyone know how to deal with them or is there any hints to get the raw data from multiple device simultaneously ?

Many thanks!
Y

Re: Errors when using API example 'play_sdr.c'

Posted: Mon Jun 18, 2018 7:48 pm
by Sasan
You need to provide the library path to the linker.

On command line:

Code: Select all

clang play_sdr.c -lmirsdrapi-rsp
On Xcode:
Under "Build Settings":
1- Add the "/usr/local/lib" to "Library Search Paths"
2- Add "-lmirsdrapi-rsp" to "Other Linker Flags"

If you've installed the SDRPlay API, the library can be found in "/usr/local/lib/libmirsdrapi-rsp.so"

Re: Errors when using API example 'play_sdr.c'

Posted: Fri Jun 22, 2018 1:40 pm
by yxs728
Sasan wrote:You need to provide the library path to the linker.

On command line:

Code: Select all

clang play_sdr.c -lmirsdrapi-rsp
On Xcode:
Under "Build Settings":
1- Add the "/usr/local/lib" to "Library Search Paths"
2- Add "-lmirsdrapi-rsp" to "Other Linker Flags"

If you've installed the SDRPlay API, the library can be found in "/usr/local/lib/libmirsdrapi-rsp.so"

Thank you for your reply Sasan, it works now!