How exactly do I need to provide libclang? Is it libclang.so or a binary named libclang? I've built LLVM on my system and provided both its libclang.so and the one in PATH, but I still can't get any more output than what's below. It seems like clangffi isn't using the libclang I'm providing.
import ffi from "ffi-napi";
import ref, { Pointer as TypedPointer, UnderlyingType } from "ref-napi";
import refStructDi, { StructObject } from "ref-struct-di";
import refArrayDi, { TypedArray } from "ref-array-di";
import refUnionDi from "ref-union-di";
const Struct = refStructDi(ref);
const Union = refUnionDi(ref);
const ArrayType = refArrayDi(ref);
const Pointer = ref.refType;
export function dlopen(libPath: string) {
return ffi.Library(libPath, {});
}
How exactly do I need to provide libclang? Is it
libclang.so
or a binary namedlibclang
? I've built LLVM on my system and provided both itslibclang.so
and the one in PATH, but I still can't get any more output than what's below. It seems likeclangffi
isn't using the libclang I'm providing.