Skip to content

Please update the book with tips for linking in C libraries #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
emchristiansen opened this issue Feb 12, 2023 · 1 comment
Open

Please update the book with tips for linking in C libraries #112

emchristiansen opened this issue Feb 12, 2023 · 1 comment

Comments

@emchristiansen
Copy link

Could you please update the book with tips for linking in C libraries?

E.g. I'm trying to wrap an existing OCaml library to make it callable form Rust, and I'm getting this error from Dune:

ld: cannot find -lrt: No such file or directory
ld: cannot find -lgmp: No such file or directory

I've tried a few attempts at getting Dune to find these libraries, but I'm not very familiar with how Dune works.

Since I'm guessing 1) you've already solved this problem, and 2) it's likely to be a common issue, could you please add a note to the book explaining the magic Dune stanzas to use?

Thanks!

@zshipko
Copy link
Owner

zshipko commented Feb 13, 2023

I haven't run into this much as I use ocaml-rs for calling Rust from OCaml - I don't have a good solution right now but see zshipko/rust-ocaml-starter#2 (comment) for a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants