banananas
banananas3mo ago

[SOLVED] dlopen failing

When I try to use Deno.dlopen() like this:
Deno.dlopen("./SDL2.dll", {} as const);
Deno.dlopen("./SDL2.dll", {} as const);
I get the following error:
error: Uncaught (in promise) TypeError: Deno.dlopen is not a function
Deno.dlopen("./SDL2.dll",{} as const);
^
error: Uncaught (in promise) TypeError: Deno.dlopen is not a function
Deno.dlopen("./SDL2.dll",{} as const);
^
Does anyone know why this could be happenning and how I could solve it? Thanks in advance.
1 Reply
banananas
banananasOP3mo ago
Nevermind; i needed to add --unstable-ffi when using deno run. for anyone with this problem, use: deno run --unstable-ffi --allow-ffi [filename]

Did you find this page helpful?