Closed fdopen closed 4 years ago
@fdopen Are you still having this issue? I think I have run into this as well when using https://github.com/whitequark/opam-cross-windows.
It's still reported in the issue tracker of ctypes from time to time, see eg.: https://github.com/ocamllabs/ocaml-ctypes/issues/435
There's a similar patch used in Cygwin: https://github.com/cygwinports/flexdll/blob/master/0.35-data-auto-imports.patch
@fdopen - would you be happy to rebase this, and it should then be merged. I'm happy to rebase it for you if you're very reasonably otherwise engaged at the moment!
(I have personally be using a version of it rebased on top of the 0.37 tag at https://github.com/dra27/flexdll/commit/6d1062642a2f872c14956d6bbb55d9bb3e6bf4a6)
Thanks, @fdopen!
I can't link to certain dlls, because flexlink can't resolve the used symbols (but the gcc toolchain can deal with them). The problem are some data symbols inside import libraries. They are prefixed with '_nm' and are therefore not found by flexlink.
libffi-6.dll:
x86_64-w64-mingw32-nm.exe libffi.dll.a:
So flexlink can resolve ffi_prep_closure, but not to ffi_type_double. (Example error message: https://github.com/ocamllabs/ocaml-ctypes/issues/198 )
Similar case: libsqlite3.dll.a
flexlink can't resolve
sqlite3_temp_directory
.The supplied patch tells flexlink about the presence of the data symbols.