# Add Custom Library to Arduino15/packages

**URL:** <https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269>\
**Category:** IDE 2.x\
**Created:** [September 19, 2024, 6:02pm UTC](https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269 "2024-09-19T18:02:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fboggle](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fboggle/32/1098606_2.png) [@fboggle](https://forum.arduino.cc/u/fboggle)\
**Post date:** [September 19, 2024, 6:02pm UTC](https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269/1 "2024-09-19T18:02:00Z")

</div>

I had built a couple of custom libraries and just added them to Arduino15/packages/esp32/hardware/esp32/2.0.16/libraries/MyLib and all worked well. I moved to the now-depricated VSCode extension and am now moving back. Now the Arduino IDE 2.3.2 cannot find those libraries (it cannot find the header files and build stops) on my Windows machine. All is well on my Mac laptop.

I never "Installed" those libraries before. I did try putting the files in a zip and tried to add them from Sketch \> Include Libraries \> Add .ZIP Library and it results in an error "Error: 13 INTERNAL: Library install failed: archive is not valid: multiple files found in zip file top level".

I also tried adding my custom directories to subdirectories in the "Libraries" subdirectory of my sketch. It still cannot find the files.

Any help is very much appreciated.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [September 19, 2024, 6:21pm UTC](https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269/2 "2024-09-19T18:21:07Z")

</div>

3rd party libraries don't belong in libraries directory of the core; they belong in the libraries directory of the sketchbook directory.

You can have a look at [Library specification - Arduino CLI](https://arduino.github.io/arduino-cli/0.19/library-specification/) if you really want to create a correct library.

You can probably just make a directory in the libraries directory in the sketchbook directory (call it e.g. myLibrary) and place your library files in there. To my knowledge it can only be a single level, no sub directories; but I might be wrong with that.

---

<div class="post-metadata">

**Author:** ![fboggle](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fboggle/32/1098606_2.png) [@fboggle](https://forum.arduino.cc/u/fboggle)\
**Post date:** [September 19, 2024, 6:27pm UTC](https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269/3 "2024-09-19T18:27:36Z")

</div>

I managed to import the libraries into Arduino/Libraries so I'm good. I just don't know why it broke. I had added the libraries to core because it was a CellClient and CellClientSecure so I thought they belonged there as peers of WiFiClient.

Thanks for your prompt reply.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [September 19, 2024, 7:25pm UTC](https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269/4 "2024-09-19T19:25:27Z")

</div>

> [@fboggle](#):
>
> I just don't know why it broke.

Maybe you updated the " **esp32**" boards platform. Everything you put into the platform installation folder will be lost every time you update the platform to a new version. Arduino IDE periodically checks to see if a new version of the installed platforms are available, and if so offers to update them for you. You might have clicked the update button in that notification without even realizing that it would affect your additions to the platform.

From this path:

> [@fboggle](#):
>
> Arduino15/packages/esp32/hardware/esp32/2.0.16/libraries/MyLib

I can see you have version 2.0.16 of the platform installed, while the latest version is 3.0.5. So you might well have received an update offer.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 18, 2025, 7:25pm UTC](https://forum.arduino.cc/t/add-custom-library-to-arduino15-packages/1303269/5 "2025-03-18T19:25:28Z")

</div>

Closed on March 18, 2025, 7:25pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
