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
Driver.Options attributes information #730
Comments
LIbraryName is the name of the generated binding. SharedLibraryName is the fallback for the native library to P/Invoke if Libraries and LibraryDirs are not used. |
Thank you very much. Also, Libraries is a list but, as far as I have seen, the generated bindings P/Invoke from only one library, so why is Libraries a list and not simply a String? |
This way one binding can wrap more than one native library. It's almost always better to have one binding per native library but we have decided to leave it more flexible. |
Ok but then how can the user achieve this? I mean, if I have two include files, like a.h and b.h that generate respectively a.dll and b.dll and I want to generate the bindings for both inside the file bind.cs, how does CppSharp know that the content of a.h should P/Invoke from a.dll and the content of b.h should P/Invoke from b.dll? |
A good question, I really forgot mentioning something important. When SharedLibraryName is not used, the CheckSymbols option must be enabled so that the correct symbol from the correct library is found. |
So in this case I should have SharedLibraryName unset, add a.dll and b.dll to Libraries and set CheckSymbols to true if I understood correctly. Oh, and since we are in the mood, what does the UnityBuild flag means? :) |
For some of the options, UnityBuild in particular, you can see their description in the source code as XML code comments. Still, I do hear you, we should definitely add some documentation for the options. |
Yeah, I've noticed only now the UnityBuild description. Sorry about all my questions but I wanted to understand these options in particular so that I can provide the best help I can to the CLI tools. |
No need to apologise at all, on the opposite, I am happy with your interest. Besides, you are touching an important point here, our documentation need some serious improvement. |
Well, I must admit that the first time I saw CppSharp I couldn't understand how it worked so I had to find examples from other users. The link to the CppParser bindings generator you sent me was a great help since it covered almost all I needed, but without asking you I would have never been able to catch the difference between the use of SharedLibraryName and Libraries. |
I agree. The problem is that we still lack important features such as templates and cannot get to the documentation and examples. Anyway, if you're done with your questions for now, please close this issue. |
Yes of course. |
I'm currently developing the CLI tools for CppSharp and I'm trying to understand the difference between these two Driver.Options attributes: Driver.Options.LibraryName and Driver.Options.SharedLibraryName.
Could you please explain the difference so I can give the end user informations about these properties?
The text was updated successfully, but these errors were encountered: