|
|
|
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
|
|
|
|
# Generating bindings |
|
|
|
|
|
|
|
|
|
Suppose we have the following declarations in a file named `Sample.h` and we |
|
|
|
|
want to bind it to .NET. |
|
|
|
|
Suppose we have the following declarations in a file named `Sample.h` located |
|
|
|
|
in `C:\Sample\include` and we want to bind it to .NET. |
|
|
|
|
|
|
|
|
|
```csharp |
|
|
|
|
class Foo |
|
|
|
@ -77,7 +77,9 @@ void Setup(Driver driver)
@@ -77,7 +77,9 @@ void Setup(Driver driver)
|
|
|
|
|
var options = driver.Options; |
|
|
|
|
options.GeneratorKind = GeneratorKind.CSharp; |
|
|
|
|
var module = options.AddModule("Sample"); |
|
|
|
|
module.IncludeDirs.Add("C:\Sample\include"); |
|
|
|
|
module.Headers.Add("Sample.h"); |
|
|
|
|
module.LibraryDirs.Add("C:\Sample\lib"); |
|
|
|
|
module.Libraries.Add("Sample.lib"); |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|