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 building C binding out of the box #69

Closed
gonzus opened this issue Aug 25, 2018 · 2 comments
Closed

Allow building C binding out of the box #69

gonzus opened this issue Aug 25, 2018 · 2 comments

Comments

@gonzus
Copy link

gonzus commented Aug 25, 2018

If I missed something, my apologies, please point me in the right direction.

I would like to wrap this library in Perl. For that I need the C binding built as a dynamic library. This seems not to be supported out of the box.

I added a simple Makefile for my own purposes, and have no problem in creating a pull request for it. But since the project uses cmake, perhaps you would rather do this differently?

Thanks!

@swolchok
Copy link
Contributor

swolchok commented Sep 6, 2018

The default out-of-box dynamic library should export both the C and C++ bindings and install headers for both. The C headers are in a subdirectory called c, so if you've installed graphqlparser's headers in /usr/local/include/graphqlparser and have that in your include path, you'd import them like #include <graphqlparser/c/GraphQLParser.h>

@swolchok swolchok closed this as completed Sep 6, 2018
@gonzus
Copy link
Author

gonzus commented Sep 6, 2018

You are absolutely right. Thanks for pointing me in the right direction!

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