# DLL not found

**URL:** https://discourse.kitware.com/t/dll-not-found/499
**Category:** Pulse Physiology Engine
**Created:** [July 2, 2020, 10:56pm UTC](https://discourse.kitware.com/t/dll-not-found/499 "2020-07-02T22:56:18Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 3:16am UTC](https://discourse.kitware.com/t/dll-not-found/499/21 "2020-07-23T03:16:59Z")

</div>

That was cross compiled with the magic leap lumin OS sdk.

They have since, changed up their build, and Pulse has changed its build system.

So I’d need to conform one to the other

I thought if I built for a generic android that would cover more systems

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 3:17am UTC](https://discourse.kitware.com/t/dll-not-found/499/22 "2020-07-23T03:17:41Z")

</div>

I can build a PulseC for Arm7

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 3:21am UTC](https://discourse.kitware.com/t/dll-not-found/499/23 "2020-07-23T03:21:12Z")

</div>

That would be amazing. Thanks!

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 3:32am UTC](https://discourse.kitware.com/t/dll-not-found/499/24 "2020-07-23T03:32:55Z")

</div>

Here is where I am getting my dockers from  
I will try the ARMv7 (but there is an ARMv7a as well…)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 4:15am UTC](https://discourse.kitware.com/t/dll-not-found/499/25 "2020-07-23T04:15:52Z")

</div>

ARMv7 is [here](https://data.kitware.com/#collection/59849c788d777f7d33e9c084/folder/5f19063f9014a6d84e3379a1)

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 4:31am UTC](https://discourse.kitware.com/t/dll-not-found/499/26 "2020-07-23T04:31:38Z")

</div>

Thanks! I will try it right now

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 4:55am UTC](https://discourse.kitware.com/t/dll-not-found/499/27 "2020-07-23T04:55:13Z")

</div>

Well… It did not work. Maybe the problem is somewhere else and it’s not because of the DLL file. Maybe in the PulseEngineDriver.cs ?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 10:23am UTC](https://discourse.kitware.com/t/dll-not-found/499/28 "2020-07-23T10:23:42Z")

</div>

That’s running fine, you are calling the allocate in C#, which is a function implemented in C++ and the PulseC.so contains the implementation. Since the library does not load, you crash.

Can you double check your target platform with the Droid Info App

This is what I get for my Pixel

 ![Screenshot_20200723-062214.png](https://discourse.kitware.com/uploads/default/original/1X/d6f3c7ab194d2397eb7dd5f7e4b9d4cca848c819.png)

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 2:18pm UTC](https://discourse.kitware.com/t/dll-not-found/499/29 "2020-07-23T14:18:35Z")

</div>

I am using two different Android devices, so here are the screenshots of both:

 ![Screenshot_20200723-101346](https://discourse.kitware.com/uploads/default/original/1X/c86d6519c29197fa28185e2a03f0d7def723ca8b.jpeg) ![Screenshot_20200723-101041_Droid Info](https://discourse.kitware.com/uploads/default/original/1X/077acf874aa6b15783b288eeb00b4e0364fadfcd.jpeg)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 2:55pm UTC](https://discourse.kitware.com/t/dll-not-found/499/30 "2020-07-23T14:55:52Z")

</div>

Are you running the unity build directly on these devices, or is there way you are emulating them?

I will look to put up a PulseC.so for arm7a today

I honestly don’t know the process for building/supporting native libraries for android distribution  
Is it somewhat analogous to how pip install works?  
The developer has to upload installs for multiple operating systems/architectures to the android store  
and the device passes up its architecture information and the store can properly see if the app has a version for the requested device or not  
So its a lot of responsibility for the developer to provide lots of builds to support multiple configurations…

Or is there a few basic platform targets for native libraries to build to that will cover most android devices well…

i just do not have enough android native development/distribution/support experience

So we are kind of feeling around in a dark room…

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 3:24pm UTC](https://discourse.kitware.com/t/dll-not-found/499/31 "2020-07-23T15:24:16Z")

</div>

I am building directly to the devices, but you could easily emulate them with an Android Emulator (Nox Player or Bluestacks4) as there are only a few architectures that work on most devices. If you implement those, it should work with no problem… But what I don’t understand is why isn’t Unity finding the dll.

I was looking into the Pulse v2 version of the asset and I don’t see a difference in the way that the DLL is being loaded, so I really don’t know why it does not work in v3 of the asset. The solution that is posted in support forums is to create a .so file for the specific version of Android and calling it directly from the file that requires it,

I will try with the PulseC.so today and let you know, but also try to get some more information on the problem so we can solve it.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 3:38pm UTC](https://discourse.kitware.com/t/dll-not-found/499/32 "2020-07-23T15:38:35Z")

</div>

Yeah, I am not sure how this is not getting found  
I assume you have deleted or replaced the PulseC.so in the Pulse asset  
(Heck delete all the PulseC.dll files and the PulseC.dylib too)

Usually, You need to somehow tag it with the right metadata for it to be found…  
I am also not sure if the same exception is really not found, or it was found and unity cannot load it

where is the unity support post you referred to?

Here is how my C# code references the dll  
[https://gitlab.kitware.com/physiology/engine/-/blob/master/src/csharp/pulse/PulseEngine.cs](https://gitlab.kitware.com/physiology/engine/-/blob/master/src/csharp/pulse/PulseEngine.cs)

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 4:00pm UTC](https://discourse.kitware.com/t/dll-not-found/499/33 "2020-07-23T16:00:23Z")

</div>

Yes, I have tried to replace/remove and even rename the file but for some reason it does not work.

I found some information here:

#### Plugins for Android Documentation:

[https://docs.unity3d.com/Manual/PluginsForAndroid.html?\_ga=2.46227492.2085545952.1595478802-1940716849.1585775750](https://docs.unity3d.com/Manual/PluginsForAndroid.html?_ga=2.46227492.2085545952.1595478802-1940716849.1585775750)

#### Native (C++) plug-ins for Android

[https://docs.unity3d.com/Manual/AndroidNativePlugins.html](https://docs.unity3d.com/Manual/AndroidNativePlugins.html)

#### Unity forum

[https://answers.unity.com/questions/1034815/how-to-include-a-native-android-library-plugin.html](https://answers.unity.com/questions/1034815/how-to-include-a-native-android-library-plugin.html)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 4:17pm UTC](https://discourse.kitware.com/t/dll-not-found/499/34 "2020-07-23T16:17:55Z")

</div>

I wonder if I need to have the android unity extension installed on my machine when I build the asset? That seems kind of silly though…

I added an android-arm PulseC to the folders that keep sending you too. Still building arm7a version… Should be done shortly…

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 4:18pm UTC](https://discourse.kitware.com/t/dll-not-found/499/35 "2020-07-23T16:18:45Z")

</div>

I went ahead and checked the actual apk file built from Unity and it does include the DLL, but for some reason it crashes when looking for it.

 ![Annotation 2020-07-21 124613](https://discourse.kitware.com/uploads/default/original/1X/01ef1a1d33b3d5f0a85da24415885ac23c8f2547.jpeg)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 4:30pm UTC](https://discourse.kitware.com/t/dll-not-found/499/36 "2020-07-23T16:30:35Z")

</div>

The ARMv7a is also up in here now  
[https://data.kitware.com/#collection/59849c788d777f7d33e9c084/folder/5da739b0d35580e6dc9e9c79](https://data.kitware.com/#collection/59849c788d777f7d33e9c084/folder/5da739b0d35580e6dc9e9c79)

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 5:13pm UTC](https://discourse.kitware.com/t/dll-not-found/499/37 "2020-07-23T17:13:02Z")

</div>

Thank you I will try it and report back

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 7:38pm UTC](https://discourse.kitware.com/t/dll-not-found/499/38 "2020-07-23T19:38:45Z")

</div>

I tried it in multiple ways, with multiple architectures… and it did not work. I really don’t know what could be the cause

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 23, 2020, 7:57pm UTC](https://discourse.kitware.com/t/dll-not-found/499/39 "2020-07-23T19:57:16Z")

</div>

Can you setup a scene in the pulse asset that just has the vitals monitor in an android emulator?  
Or at least a setup guide?  
That seems to be a way to quickly test…

I will see if I can do it, but any help getting me up will shorten investigation time

---

<div class="post-metadata">

### Author: ![Degly](https://discourse.kitware.com/user_avatar/discourse.kitware.com/degly/32/263_2.png) [@Degly](https://discourse.kitware.com/u/Degly)
#### Post date: [July 23, 2020, 8:39pm UTC](https://discourse.kitware.com/t/dll-not-found/499/40 "2020-07-23T20:39:42Z")

</div>

For sure! What I do is that I open the Vitals Monitor Scene included in the asset and build it to Android directly after changing the .so file. It gives the same error as it still cannot find the dll.

About changing the dll, I download the .so files that you sent and replace them either in

Assets/PulsePhysiologyEngine/Plugins\Native  
or  
Assets/Plugins/Android/Libs/armeabi-v7a

It should be super easy to reproduce

[Previous page](https://discourse.kitware.com/t/dll-not-found/499.md?page=1)

[Next page](https://discourse.kitware.com/t/dll-not-found/499.md?page=3)
