-
Notifications
You must be signed in to change notification settings - Fork 230
primitive FFI sample broken on macOS due to import problem #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you please submit the fix as a pull request? |
Also, I'm curious how your change fixes things. Is there two different |
@domesticmouse Hi, I got the same problem on my machine, but seems like the issue is using relative paths when trying to import the library (I get this message in the exception: "file system relative paths not allowed in hardened programs"). |
On MacOS the dylib needs to be in the same or a sub folder of the dart executable. See dart-lang/sdk#38314 (comment). (I'm not sure if you can fix the sample here, as the dart binary is part of the SDK folder and this simples repo is a different repo.) |
I did a breaking change, I changed those methods to be extension methods. Importing with |
Hi I think the one proposed by @dcantir fix the problem and it's a minor one, can someone help take a look on that? Thanks! |
Problem
On macOS, running the primitive sample code after proper CMaking the C lib gives the following error
Fix
The text was updated successfully, but these errors were encountered: