CppSharp 0.8.14

There is a newer version of this package available.
See the version list below for details.
dotnet add package CppSharp --version 0.8.14                
NuGet\Install-Package CppSharp -Version 0.8.14                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CppSharp" Version="0.8.14">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CppSharp --version 0.8.14                
#r "nuget: CppSharp, 0.8.14"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CppSharp as a Cake Addin
#addin nuget:?package=CppSharp&version=0.8.14

// Install CppSharp as a Cake Tool
#tool nuget:?package=CppSharp&version=0.8.14                

CppSharp is a tool and set of libraries which allows programmers to use C/C++ libraries with high-level programming languages (such as C#).

It is a tool that takes C/C++ header and library files and generates the necessary glue to surface the native API as a managed API. Such an API can be used to consume an existing native library in your high-level code or add scripting support to a native codebase.

The supported target languages at present are C# and C++/CLI.

It can also be used as a library to parse native code into a syntax tree with a rich declaration and type information model.

The NuGet version is Windows 64-bit only for the time being. Binary 32-bit releases for Windows can be found at https://github.com/mono/CppSharp/releases .

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CppSharp:

Package Downloads
Spout.NET

Spout.NET is a C# .NET Implementation for Spout2, A video frame sharing system.

BindingGenerator

CppSharp based binding generator for dotnet

GitHub repositories (7)

Showing the top 5 popular GitHub repositories that depend on CppSharp:

Repository Stars
tooll3/t3
Tooll 3 is an open source software to create realtime motion graphics.
Ruslan-B/FFmpeg.AutoGen
FFmpeg auto generated unsafe bindings for C#/.NET and Core (Linux, MacOS and Mono).
ddobrev/QtSharp
Mono/.NET bindings for Qt
sdcb/OpenVINO.NET
High quality .NET wrapper for OpenVINO™ toolkit.
sdcb/Sdcb.FFmpeg
FFmpeg basic .NET API generated by CppSharp
Version Downloads Last updated
1.1.5.3168 38,162 10/18/2023
1.1.1.10805 7,599 10/18/2023 1.1.1.10805 is deprecated because it has critical bugs.
1.0.76.8341 8,545 10/18/2023 1.0.76.8341 is deprecated because it has critical bugs.
1.0.54.626 20,485 5/31/2023
1.0.45.22293 23,555 2/6/2023
1.0.1 55,746 12/30/2021
1.0.0 17,929 10/12/2021
0.11.2 20,578 2/4/2021
0.11.1 9,207 2/3/2021
0.11.0 9,399 1/29/2021
0.10.5 28,443 6/27/2020
0.10.4 2,348 5/23/2020
0.10.3 4,550 4/9/2020
0.10.2 5,897 3/28/2020
0.10.1 7,577 7/4/2019
0.10.0 2,892 6/25/2019
0.9.2 2,760 5/7/2019
0.9.1 2,376 4/13/2019
0.9.0 7,927 3/1/2019
0.8.23 2,662 1/31/2019
0.8.22 4,448 9/24/2018
0.8.21 3,199 8/1/2018
0.8.20 3,048 5/25/2018
0.8.19 3,494 2/4/2018
0.8.18 3,535 1/27/2018
0.8.17 2,950 12/25/2017
0.8.16 3,125 11/10/2017
0.8.15 2,540 11/7/2017
0.8.14 4,164 9/17/2017
0.8.13 2,941 7/18/2017
0.8.12 2,496 7/18/2017
0.8.11 3,257 6/4/2017
0.8.10 2,968 4/23/2017
0.8.9 2,550 4/16/2017
0.8.8 2,470 4/9/2017
0.8.7 2,684 3/27/2017
0.8.6 2,858 3/4/2017
0.8.5 2,531 3/4/2017
0.8.4 3,408 2/10/2017
0.8.3 2,621 2/5/2017
0.8.2 2,608 1/25/2017
0.8.1 2,566 1/22/2017
0.8.0 2,356 1/22/2017
0.7.13 2,547 1/16/2017
0.7.12 2,821 11/17/2016
0.7.11 2,468 11/13/2016
0.7.10 2,390 11/11/2016
0.7.9 2,561 11/2/2016
0.7.8 2,412 11/1/2016
0.7.7 2,645 11/1/2016
0.7.6 2,537 10/28/2016
0.7.5 2,431 10/27/2016
0.7.4 2,480 10/25/2016
0.7.3 2,475 10/1/2016
0.7.2 2,752 9/17/2016
0.7.1 2,436 9/13/2016
0.7.0 2,395 9/12/2016
0.6.0 2,376 6/24/2016
0.5.2 2,399 6/17/2016
0.5.1 2,321 6/17/2016
0.5.0 2,499 6/14/2016

Added experimental support for templates.
Fixed the generated C# when a virtual function takes a fixed array.
Fixed the generated C# for fixed arrays in types of parameters.
Fixed the generated C# for virtuals taking arrays of objects.
Lookup Mono SDK path on Windows registry.
Fixed the generated C# when a virtual function takes an array.
Fixed the generated C# with 4+ modules and repetitive delegates.
Added C# marshalling of parameters of type array of const char* const.
Added C# marshalling of parameters of type array of const char*.
Fixed null arrays in C# to be passed as such to C/C++.
Added C# marshalling of parameters of type array of objects.
Added C# marshalling of parameters of type array of primitives.
Added marshalling of parameters of type array of pointers.
Fixed the generated C# for two anonymous types nested in another anonymous type.
Removed unused internals from the generated C#.
Added an example for the parser API-s.
Add C++17 to the parser options
Compile.sh script now has improved error handling.
Linux toolchain can be supplied in the same spirit in path probing on Mac.
Enabled empty arrays of non-primitives only when not using MSVC.
Ignore zero-sized constant C array types.
The compilation platform is now nullable by default and validated by the host platforms.
Added LLVM target initialization and supporting libraries for parsing inline assembly.
Fixed a crash when trying to use a VS version missing from the system.
Fixed the binding of multiple identical function pointers with a calling convention.
Got rid of anonymous names for delegates.
Fixed the calling conventions of delegates.
Ensures that if a delegate is used for a virtual as well as something else, it finally ends up as public.
Fixed the code generation when the return type of a method is a function pointer that has been used somewhere else as well.
Added Access and Calling convention to the delegate definition.
Generated properties from setters returning Booleans.
Added some aliases to options in the CLI tool.
[generator] Improved processing for C++ inline namespaces.
Fixed initial output messages in the CLI.
Generated properties from <type> get()/void get(<type>) pairs.
Restored the option for generating one C# file per unit.
Fixed the sorting of modules to also work with manually added dependencies.
Do not generated unformatted code if debug mode is enabled.
Added an option to the CLI for enabling debug mode for generated output.
Improved the directory setup in the CLI in case the path is not a file path.
Adds a new option to the CLI for automatic compilation of generated code.
Adds a new dedicated "-exceptions" flag to enable C++ exceptions in the CLI.
Added a new -A option to the CLI to pass compiler arguments to Clang parser.
Fixed the name of an option in the CLI.
Removed the showing of help for the CLI if we have output an error previously.
Improved error messages in the CLI.
Improve platform detection in the CLI so the current platform is set by default.
Fixed a directory check in the CLI that was throwing exceptions in Mono.
Fixed the generated C# indexers for specialisations of pointers.
Fixed the generated C# for increment and decrement operators.
Removed leftovers in the comments from unsupported custom xml tags.
Fixed the generation of symbols to check all base classes up the chain.
Printed the text from unsupported comment tags.
Fixed the generated C# for a case of a typedef of a function pointer.
   - Typedefs of function pointers can be written in two ways:
     typedef void (*typedefedFuncPtr)();
     int f(typedefedFuncPtr fptr);
     typedef void (typedefedFuncPtr)();
     int f(typedefedFuncPtr* fptr);
     Up until now we only supported the former.
Fixed the C# generation for functions with typedefed function pointers as params
Set the name-space of a parameter to its function.
Included the comments plain text to the remarks block.
Fix the typo in LLVM.lua
Prevented projects from being generated using GenerateProjects.bat
Fixed the generated C# for setters with a reference to a primitive type.
Ensured a single element for remarks in the generated XML documentation comments.
Fixed the renaming of methods in forwarded types from secondary bases in dependencies.
Added to a method a list of its overridden methods.
Generated internals of external specialisations only if the template has template fields.
Equalised the access of overrides and their base methods.
Fixed the code generation for indexers returning a void pointer.
Fixed the generated C# when a protected constructor has a parameter with a protected type.
Fixed the generated C# when an external specialisation with a dependent field is used as a field.
Made Function a DeclarationContext to match the Clang AST.
Made the C/C++ language switches adjustable in managed code.
Added an option to enable or disable RTTI.
Fixed the generation of inlines to handle types in classes in name-spaces.