Errors when using API example 'play_sdr.c'

Post information or questions regarding SDRplay products here
Post Reply
yxs728
Posts: 2
Joined: Wed Jun 13, 2018 4:51 pm

Errors when using API example 'play_sdr.c'

Post by yxs728 » Mon Jun 18, 2018 2:55 pm

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
Attachments
screen.png
screen.png (66.38 KiB) Viewed 9460 times
Last edited by yxs728 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Sasan
Posts: 124
Joined: Sat Jun 27, 2015 1:15 am
Location: Berlin

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

Post by Sasan » Mon Jun 18, 2018 7:48 pm

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"

Reason: No reason
DF2HF, NM9A, EP2C

yxs728
Posts: 2
Joined: Wed Jun 13, 2018 4:51 pm

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

Post by yxs728 » Fri Jun 22, 2018 1:40 pm

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!
Last edited by yxs728 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Post Reply