Unable to use iio on the target Linux platform


I am using ZC702 with FMCOMMS5. I have the ADI Linux running on the platform, and iio-oscilloscope is running fine on the system. I can also connect to it from a remote client (Visual Studio on my Windows machine) to send and receive data to iiod host.

But when I try to build the code having iio functions on the Linux platform itself, I get the "Undefined reference" error (please see the attached screenshot. I also tried it from terminal and got the same error).

I am using the build command: [g++ -Wall -liio -o Aurora Aurora.cpp]. It does not complain about finding the header file nor the iio library, but somehow cannot find the reference to the functions.

I also tried re-installing iio library using the procedures in https://wiki.analog.com/resources/tools-software/linux-software/libiio (I tried two methods: 1- the one in: "Building on the Linux Host Target" section, and 2- procedure in "Rebuild LibIIO" section). Please let me know how I can resolve this issue.


[edited by: MHA at 2:08 AM (GMT 0) on 11 Nov 2019]