Skip to content
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

Allow (c_names ...) in (executable ...) #1858

Closed
Niols opened this issue Feb 20, 2019 · 2 comments · Fixed by #2562
Closed

Allow (c_names ...) in (executable ...) #1858

Niols opened this issue Feb 20, 2019 · 2 comments · Fixed by #2562

Comments

@Niols
Copy link
Contributor

Niols commented Feb 20, 2019

Hello,

By discussing with @diml in #1832 (thanks again), I discovered the (modes object) stanza in order to build a C library from OCaml code super easily. However, in my case, we wrote a little piece of C wrapper around that library in order to have more C-like access points.

I think it would be nice to be able to declare this wrapper as C stubs in the (executable ...) stanza, that is to have (c_names ...) allowed in there (and probably (cxx_names ...) as well). Do you think it's reasonable?

@rgrinberg
Copy link
Member

rgrinberg commented Feb 21, 2019

Would this proposal work for you?: #1786

You will be able to define an executable using pure C. Note that we'll still probably add support to {c,cxx}_names to the executable stanza.

@Niols
Copy link
Contributor Author

Niols commented Mar 4, 2019

In my case, it's indeed a pure C piece of code that depends on my OCaml library, but the goal is to build an object file and not an executable. However, as I guess it's very similar, could that be a feature in this PR?

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

Successfully merging a pull request may close this issue.

2 participants