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

Is there documentation? #144

Closed
PeterDraex opened this issue Jun 10, 2020 · 8 comments
Closed

Is there documentation? #144

PeterDraex opened this issue Jun 10, 2020 · 8 comments

Comments

@PeterDraex
Copy link

Hello,

is there any sort of documentation for ClangSharp?

I'd like to genereate C# wrapper from C/C++ header for Win32 API, can't find any tutorial on how to do that with ClangSharp.

Thanks.
Peter

@StephenHodgson
Copy link

If this is a Windows API, have you checked out https://github.com/microsoft/CsWinRT?

@PeterDraex
Copy link
Author

@StephenHodgson It doesn't include headers that I need.

@StephenHodgson
Copy link

StephenHodgson commented Jun 11, 2020

What's missing?

@PeterDraex
Copy link
Author

@tannergooding
Copy link
Member

There isn't currently any documentation and it's something that should be worked on.

The simplest scenario is to get ClangSharpPInvokeGenerator and then pass in the appropriate args.

An example of possible command lines are: https://github.com/microsoft/ClangSharp/blob/master/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json, which is what is used to generate bindings for Clang and LLVM themselves.

I'll try to get something more comprehensive written up with examples, but I don't expect that will be completed today.

@Perksey
Copy link
Member

Perksey commented Aug 19, 2020

Also if this is Win32 TerraFX might have what you need

@kkukshtel
Copy link
Contributor

Bumping this again. Trying to figure out how to use this library as it seems like exactly what I need, but stunned there seems to be 0 documentation on how to use it, from an official Microsoft repo no less. Would love even just a basic sample of using it as part of both a project and the command line.

@tannergooding
Copy link
Member

#214 adds some basic docs on how to use the P/Invoke generator. You can see https://github.com/microsoft/ClangSharp#generating-bindings for more details.

Please feel free to request additional information or clarification if its needed and I'll work on updating the docs further.

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

5 participants