# Libiio.so correct settings for use

**URL:** <https://forum.legato.io/t/libiio-so-correct-settings-for-use/7019>\
**Category:** Uncategorized\
**Created:** [August 5, 2026, 12:31pm UTC](https://forum.legato.io/t/libiio-so-correct-settings-for-use/7019 "2026-08-05T12:31:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmark](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pmark](https://forum.legato.io/u/pmark)\
**Post date:** [August 5, 2026, 12:31pm UTC](https://forum.legato.io/t/libiio-so-correct-settings-for-use/7019/1 "2026-08-05T12:31:32Z")

</div>

I am trying to use libiio that is in the 3rdParty folder,

everything seems to compile and install fine but can’t debug ?

sshWrapper: /legato/systems/current/apps/hubApp/read-only/bin/MCExe: error while loading shared libraries: libiio.so.0: cannot open shared object file: No such file or directory

the library is on the device (i tried to put it in different locations)

root@swi-mdm9x28-wp:~# find / -iname “_iio_”  
/dev/iio:device0  
/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/bin/libiio.so  
/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/lib/libiio.so  
/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/libiio.so  
/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/libiio.so.0  
/mnt/flash/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/bin/libiio.so  
/mnt/flash/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/lib/libiio.so  
/mnt/flash/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/libiio.so  
/mnt/flash/legato/apps/e8dbb1ad4dde714a84bb2f21955ba3d1/read-only/libiio.so.0  
find: /proc/3812: No such file or directory  
/sys/kernel/debug/iio  
/sys/devices/platform/200f000.qcom,spmi/spmi-0/spmi0-00/200f000.qcom,spmi:qcom,pm8019@0:vadc@3100/iio:device0  
/sys/bus/iio  
/sys/bus/iio/devices/iio:device0

added a Component.cdef

externalBuild:

{

// Sourcing the environment script is required so that the correct pkg-config is run

“. $LEGATO\_SYSROOT/../../environment-setup-armv7a-neon-poky-linux-gnueabi && cmake -G Ninja $CURDIR”

“. $LEGATO\_SYSROOT/../../environment-setup-armv7a-neon-poky-linux-gnueabi && cmake --build .”

}

bundles:

{

file:

```
{

    $BUILDDIR/libiio.so /lib/

}

```

}

provides:

{

/\*

```
 \* Legato's provides lib functionality has a bug described in LE-12987. Once this bug is fixed,

 \* this provides/lib section can be uncommented and the requires/lib section below can be

 \* removed.

 \*/

```

lib:

```
{

    $BUILDDIR/libiio.so

}

```

headerDir:

```
{

    $BUILDDIR

}

```

}

requires:

{

lib:

```
{

    libiio.so

}

```

}

ldflags:

{

```
-L${BUILDDIR}

```

}

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 5, 2026, 5:00pm UTC](https://forum.legato.io/t/libiio-so-correct-settings-for-use/7019/2 "2026-08-05T17:00:09Z")

</div>

here is an example to show how to load 3rd parth library .so into the legato application:

> [@WP7607 Libsqlite Error In Legato application](https://forum.legato.io/t/wp7607-libsqlite-error-in-legato-application/7017/4):
>
> I don’t see problem in FW R16.3 with attached testsql.zip, you can try my application. [testsql.zip](https://forum.legato.io/uploads/short-url/aYKZFaSLmCAHrw6l02Jf2RWnbkW.zip) (2.4 MB) Jan 6 08:15:15 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1027]/supervisor T=main | app.c app\_Create() 3258 | Creating app 'testsql' Jan 6 08:15:15 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1027]/supervisor T=main | proc.c GetFaultAction() 326 | No fault action specified for process 'testsql'. Assuming 'ignore'. Jan 6 08:15:15 swi-mdm9x28-wp user.warn Legato: -WRN…

---

<div class="post-metadata">

**Author:** ![pmark](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pmark](https://forum.legato.io/u/pmark)\
**Post date:** [August 7, 2026, 12:42pm UTC](https://forum.legato.io/t/libiio-so-correct-settings-for-use/7019/3 "2026-08-07T12:42:46Z")

</div>

Thanks got it to work
