Hi I have working ctypes bindings for MariaDB's libmysqlclient at
https://github.com/andrenth/ocaml-mariadb I basically copied and adapted the project structure from https://github.com/simonjbeaumont/ocaml-flock to get stub generation working. Currently I'm doing let foreign name typ = foreign name typ ~from:Dl.(dlopen ~filename:"libmysqlclient.so" ~flags:[RTLD_NOW]) to avoid getting a build error: Fatal error: exception Dl.DL_error("/home/andre/.opam/4.03.0/lib/stublibs/dllctypes-foreign-base_stubs.so: undefined symbol: mysql_server_init") I'd like to get rid of that, and from googling I found the suggestion of adding "CCOpt: -Wl,-no-as-needed" (I'm on Ubuntu) to the _oasis file, but that didn't seem to make a difference. I'm also not sure if that suggestion if still current, and the repositories I found on github with a similar structure don't seem to be using that option. They don't seem to be using the dlopen trick either, so I'm guessing there's some other way to fix this. Any help would be greatly appreciated. Best regards, Andre
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Ctypes mailing list [email protected] http://lists.ocaml.org/listinfo/ctypes
