# Adding static libraries

**URL:** https://forum.amebaiot.com/t/adding-static-libraries/1413
**Category:** SDK
**Created:** [August 30, 2022, 6:42am UTC](https://forum.amebaiot.com/t/adding-static-libraries/1413 "2022-08-30T06:42:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mair](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mair](https://forum.amebaiot.com/u/mair)
#### Post date: [August 30, 2022, 6:42am UTC](https://forum.amebaiot.com/t/adding-static-libraries/1413/1 "2022-08-30T06:42:37Z")

</div>

Hi,  
I have an Arduino library that uses a static library (a .a file) When I try to compile I see the following  
`The platform does not support 'compiler.libraries.ldflags' for precompiled libraries.`  
I have the following in the library

```auto
ldflags=-lrestrs
precompiled=full

```

Does anyone know how to work around this?

Thanks

---

<div class="post-metadata">

### Author: ![xidameng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/xidameng/32/18_2.png) [@xidameng](https://forum.amebaiot.com/u/xidameng)
#### Post date: [August 31, 2022, 2:28am UTC](https://forum.amebaiot.com/t/adding-static-libraries/1413/2 "2022-08-31T02:28:24Z")

</div>

Have you tried patching your `platform.txt` file before compiling the library? If not, you can check out this thread for more information,

> **[The platform does not support 'compiler.libraries.ldflags' for precompiled...](https://answers.ros.org/question/404335/the-platform-does-not-support-compilerlibrariesldflags-for-precompiled-libraries/)**
>
> Hi everyone, A) My setup: Xubuntu 20.04, ROS2 Foxy, microros foxy 2.05, Arduino Due, Jetson Nano 4GB B) My question: I just trying out microROS with my Arduino Due. However, this error come out when I try to just compile without uploading the code....
