# Cannot load .dylib in Processing 4?

**URL:** <https://discourse.processing.org/t/cannot-load-dylib-in-processing-4/36692>\
**Category:** Libraries\
**Created:** [May 3, 2022, 2:06pm UTC](https://discourse.processing.org/t/cannot-load-dylib-in-processing-4/36692 "2022-05-03T14:06:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bananana](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@bananana](https://discourse.processing.org/u/bananana)\
**Post date:** [May 3, 2022, 2:06pm UTC](https://discourse.processing.org/t/cannot-load-dylib-in-processing-4/36692/1 "2022-05-03T14:06:38Z")

</div>

I made a library that loads a .dylib file and calls some functions from it. Since the upgrade to Processing 4, the library can’t find the dylib and throws an error when trying to load it:

UnsatisfiedLinkError: Unable to load library ‘ftd2xx’: Native library (darwin/libftd2xx.dylib) not found in resource path

I’m loading the library like this:

`Native.loadLibrary("ftd2xx", FTDI_D2XX.class);`

Processing3 searches in /usr/local/lib/ for dylibs but I’m not sure where P4 is looking for the dylibs?

any ideas?

---

<div class="post-metadata">

**Author:** ![bananana](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@bananana](https://discourse.processing.org/u/bananana)\
**Post date:** [May 4, 2022, 7:01am UTC](https://discourse.processing.org/t/cannot-load-dylib-in-processing-4/36692/2 "2022-05-04T07:01:00Z")

</div>

I’ve managed to make it point to the correct location now. But another questions…  
How can I get the location of the libraries folder from with a Processing app? Is there some builtin variable?
