Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3816

Dylib Declare Function Not Found

$
0
0

I’m trying to access one function in a small third party C dylib. I can successfully use dlopen to open the dylib. I can even use dlsym to get a handle to the function I want to call. System.IsFunctionAvailable returns true for the function I want.

But whenever I try to actually call the function I get a Function Not Found exception.

dylib function is:

int encode_file(char const * in, char const * out)
Declare Function encode_file Lib "@ExecutablePath/../Frameworks/lzss.dylib" (Ifile as CString, Ofile as CString  ) As Integer
var Infile as CString = fin.NativePath
var OutFile as CString = fTemp.NativePath
var result as integer = encode_file(Infile, Outfile)

What else can cause the function to not load or be callable? Are certain access rights needed on the dylib to make it executable? (It’s in my app’s Frameworks folder) If I had the parameter types wrong would that give a Function Not Found exception? Is code signing now required to use a third party dylib? I’m on OSX 15.1.1

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3816

Trending Articles