ygrek / ocurl

OCaml bindings to libcurl
https://ygrek.org/p/ocurl
MIT License
59 stars 32 forks source link

Missing curl.cmxs #24

Closed colin-gd closed 6 years ago

colin-gd commented 7 years ago

I've written a library that uses ocurl. This lib used in an ocsigen project as well. When running the server byte code everything runs well. However the native version doesn't compile. The error message is the following : ocsigenserver.opt: ocsigen:main: Fatal - While loading ~/.opam/4.04.0/lib/curl/curl.cmxs: cannot find file ~/.opam/4.04.0/lib/curl/curl.cmxs in search path

My guess is that the curl findlib package doesn't include the a curl.cmxs file. This file should be used for dynamic linking in native compilation. I don't know if this is possible, but it would be nice to have a fix for that. I'm not familiar with msvc so I haven't tried to write a patch.

ygrek commented 6 years ago

Please see cmxs branch in this repo. I never used cmxs so not sure if result is correct (esp. curl_lwt.cmxs) and how the dependencies are managed, but produces files seem to have all required symbols and can be dynlink-loaded.

colin-gd commented 6 years ago

Cool! Well, I haven't checked extensively but it does seem to work! Thanks :) 👍 Will you be merging it to master branch?

ygrek commented 6 years ago

fixed b56ce34