我一直在尝试编译一个使用ctypes
and的最新应用程序sqlexpr
,但是我遇到了符号无法解析的问题。我从 OPAM 构建了 ctypes 和 sqlexpr,并更新了libffi
brew 的版本,但不明白为什么我可能无法获得正确的库链接。有谁愿意猜一猜吗?(我已经尝试过我的典型解决方法,即传入CFLAGS="-arch i386"
)
Undefined symbols for architecture x86_64:
"_ffi_closure_alloc", referenced from:
_ctypes_make_function_pointer in libctypes-foreign-base_stubs.a(ffi_call_stubs.o)
"_ffi_prep_closure_loc", referenced from:
_ctypes_make_function_pointer in libctypes-foreign-base_stubs.a(ffi_call_stubs.o)
"_sqlite3_enable_load_extension", referenced from:
_caml_sqlite3_enable_load_extension in libsqlite3_stubs.a(sqlite3_stubs.o)
(maybe you meant: _caml_sqlite3_enable_load_extension)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "_none_", line 1:
Error: Error while building custom runtime system
Command exited with code 2.
Compilation unsuccessful after building 41 targets (40 cached) in 00:00:00.
make: *** [all] Error 10