# Function Not Found

**URL:** <https://forum.xojo.com/t/function-not-found/52737>\
**Category:** General\
**Created:** [March 12, 2020, 2:18pm UTC](https://forum.xojo.com/t/function-not-found/52737 "2020-03-12T14:18:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 2:18pm UTC](https://forum.xojo.com/t/function-not-found/52737/1 "2020-03-12T14:18:02Z")

</div>

What could cause a function not found error in a soft declare when Im 100% of the parameters and function name?

I have a dylib that a new version doesnt work, although it does in XCode. Ive had the older dylib function for years.

Is there something in the compiler that could break comparability with Xojo?

Suggestions?

---

<div class="post-metadata">

**Author:** ![brian\_franco](https://forum.xojo.com/user_avatar/forum.xojo.com/brian_franco/32/156_2.png) [@brian\_franco](https://forum.xojo.com/u/brian_franco)\
**Post date:** [March 12, 2020, 2:21pm UTC](https://forum.xojo.com/t/function-not-found/52737/2 "2020-03-12T14:21:43Z")

</div>

Debugging?

Maybe use a CopyFile step for debugging?

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 2:48pm UTC](https://forum.xojo.com/t/function-not-found/52737/3 "2020-03-12T14:48:06Z")

</div>

Im not sure I understand what you mean.

---

<div class="post-metadata">

**Author:** ![brian\_franco](https://forum.xojo.com/user_avatar/forum.xojo.com/brian_franco/32/156_2.png) [@brian\_franco](https://forum.xojo.com/u/brian_franco)\
**Post date:** [March 12, 2020, 2:49pm UTC](https://forum.xojo.com/t/function-not-found/52737/4 "2020-03-12T14:49:20Z")

</div>

I was just asking if you are getting the error while debugging?

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 2:53pm UTC](https://forum.xojo.com/t/function-not-found/52737/5 "2020-03-12T14:53:48Z")

</div>

Oh, yes.  
And I am using a copy file step to move the lib into the right place.  
If I drop the old dylib into the project it all comes to life - so I know all other things are equal. Im sure its something in the XCode build settings, but Im not familiar enough to say what.

---

<div class="post-metadata">

**Author:** ![brian\_franco](https://forum.xojo.com/user_avatar/forum.xojo.com/brian_franco/32/156_2.png) [@brian\_franco](https://forum.xojo.com/u/brian_franco)\
**Post date:** [March 12, 2020, 2:56pm UTC](https://forum.xojo.com/t/function-not-found/52737/6 "2020-03-12T14:56:19Z")

</div>

Chris,

ok well you have the copy handled 🙂

I’m not familiar enough with Xcode to be of anymore help ☹

I’m sure someone with more expertise will chime in soon

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 3:13pm UTC](https://forum.xojo.com/t/function-not-found/52737/7 "2020-03-12T15:13:51Z")

</div>

Thanks for trying.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 12, 2020, 3:16pm UTC](https://forum.xojo.com/t/function-not-found/52737/8 "2020-03-12T15:16:04Z")

</div>

Are change notes on the library available where you might figure out what’s going wrong?

I know one of the things that can go wrong is the paths to dependencies, I’m not sure how to explain it. There was a lot of googling and advice involved with getting the OpenSSL library to play friendly within an app.

@Norman Palardy might have better insight.

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 4:12pm UTC](https://forum.xojo.com/t/function-not-found/52737/9 "2020-03-12T16:12:17Z")

</div>

Ive looked at the change logs. Nothing I can see should cause this.  
I have to believe its a dependency issue Im just not aware of.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 12, 2020, 4:41pm UTC](https://forum.xojo.com/t/function-not-found/52737/10 "2020-03-12T16:41:43Z")

</div>

This technical deep dive has information collected on the topic: [https://medium.com/@cormiertyshawn895/deep-dive-how-does-retroactive-work-95fe0e5ea49e](https://medium.com/@cormiertyshawn895/deep-dive-how-does-retroactive-work-95fe0e5ea49e)

This article is a huge technical insight into fixing iPhoto et all for Catalina, but has a major portion about dylib stuff. Jump down to Step 2 / name\_tool for where I started with OpenSSL.

Edit: It covers extracting the dylib and changing the path, which is what I needed. It’s not super detailed on what’s actually going on, I must have read about that elsewhere.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [March 12, 2020, 4:48pm UTC](https://forum.xojo.com/t/function-not-found/52737/11 "2020-03-12T16:48:25Z")

</div>

for dylibs, check with “otool -l” the list of dependencies of your libraries.

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 7:05pm UTC](https://forum.xojo.com/t/function-not-found/52737/12 "2020-03-12T19:05:31Z")

</div>

Christian, I did and everything seems to be there.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 12, 2020, 7:15pm UTC](https://forum.xojo.com/t/function-not-found/52737/13 "2020-03-12T19:15:42Z")

</div>

> [@478918:@Chris Halford](#):
>
> Christian, I did and everything seems to be there.

If all the paths point to valid locations, my suggestion probably becomes irrelevant.

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 7:16pm UTC](https://forum.xojo.com/t/function-not-found/52737/14 "2020-03-12T19:16:14Z")

</div>

I was pouring through that. Thanks for the heads up!

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [March 12, 2020, 7:17pm UTC](https://forum.xojo.com/t/function-not-found/52737/15 "2020-03-12T19:17:40Z")

</div>

Have you confirmed that the new dylib is 64 bit (I assume the app is also)?

---

<div class="post-metadata">

**Author:** ![Chris\_Halford](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_halford/32/480_2.png) [@Chris\_Halford](https://forum.xojo.com/u/Chris_Halford)\
**Post date:** [March 12, 2020, 7:35pm UTC](https://forum.xojo.com/t/function-not-found/52737/16 "2020-03-12T19:35:22Z")

</div>

Julian, I have. All 64bit.

If anyone thinks they are savvy enough to solve this in an hour for $ contact me privately and we can make arrangements.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [March 12, 2020, 8:32pm UTC](https://forum.xojo.com/t/function-not-found/52737/17 "2020-03-12T20:32:12Z")

</div>

You can load dylib with [SoftDeclareMBS](http://www.monkeybreadsoftware.net/class-softdeclarembs.shtml) class and look on the error message.

The hardened runtime usually blocks loading of dylibs not signed by same certificate as app.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 12, 2020, 10:30pm UTC](https://forum.xojo.com/t/function-not-found/52737/18 "2020-03-12T22:30:21Z")

</div>

> [@478941:@Christian Schmitz](#):
>
> You can load dylib with [SoftDeclareMBS](http://www.monkeybreadsoftware.net/class-softdeclarembs.shtml) class and look on the error message.

There is no error message property. There is an error code property but no listing of what they mean.  
What does `-1` mean?

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [March 13, 2020, 6:30am UTC](https://forum.xojo.com/t/function-not-found/52737/19 "2020-03-13T06:30:01Z")

</div>

A very old class. Way before we had soft declares in Xojo.

Check Liberror property after calling LoadDylib method.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [March 13, 2020, 2:04pm UTC](https://forum.xojo.com/t/function-not-found/52737/20 "2020-03-13T14:04:50Z")

</div>

Seems like we got it fixed for @Chris Halford with using [SoftDeclareMBS](http://www.monkeybreadsoftware.net/class-softdeclarembs.shtml) to load a dependency first:

[code]Dim f As FolderItem = app.ExecutableFile.parent.Child(“libOther.dylib”)  
Dim s2 As New SoftDeclareMBS  
If s2.LoadDylib(f.NativePath) Then  
MsgBox “OK”  
Else  
MsgBox s2.Liberror  
End If

Soft Declare Function testFunction Lib MyLib ( s As cString) As Integer  
Dim h As Integer = testFunction( “test” )

If h \<\> 0 Then  
MsgBox "Success "+str(h)  
Else  
MsgBox “Failed”  
End If[/code]

So when loading the second lib, there is already the first one loaded and initialized and it works.

[Next page](https://forum.xojo.com/t/function-not-found/52737.md?page=2)
