CppSharp 0.8.17

There is a newer version of this package available.
See the version list below for details.
dotnet add package CppSharp --version 0.8.17
NuGet\Install-Package CppSharp -Version 0.8.17
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.17">
  <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.17
#r "nuget: CppSharp, 0.8.17"
#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.17

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

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 (1)

Showing the top 1 NuGet packages that depend on CppSharp:

Package Downloads
Spout.NET

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

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
allisterb/jemalloc.NET
A native memory manager for .NET
sdcb/OpenVINO.NET
High quality .NET wrapper for OpenVINO™ toolkit.
Version Downloads Last updated
1.1.5.3168 17,596 10/18/2023
1.1.1.10805 7,415 10/18/2023
1.0.76.8341 8,290 10/18/2023
1.0.54.626 16,661 5/31/2023
1.0.45.22293 19,286 2/6/2023
1.0.1 50,758 12/30/2021
1.0.0 16,879 10/12/2021
0.11.2 20,356 2/4/2021
0.11.1 9,128 2/3/2021
0.11.0 9,237 1/29/2021
0.10.5 24,988 6/27/2020
0.10.4 2,305 5/23/2020
0.10.3 4,467 4/9/2020
0.10.2 5,804 3/28/2020
0.10.1 7,409 7/4/2019
0.10.0 2,745 6/25/2019
0.9.2 2,718 5/7/2019
0.9.1 2,347 4/13/2019
0.9.0 7,863 3/1/2019
0.8.23 2,605 1/31/2019
0.8.22 4,371 9/24/2018
0.8.21 3,131 8/1/2018
0.8.20 3,011 5/25/2018
0.8.19 3,439 2/4/2018
0.8.18 3,429 1/27/2018
0.8.17 2,910 12/25/2017
0.8.16 3,065 11/10/2017
0.8.15 2,481 11/7/2017
0.8.14 4,062 9/17/2017
0.8.13 2,881 7/18/2017
0.8.12 2,459 7/18/2017
0.8.11 3,197 6/4/2017
0.8.10 2,904 4/23/2017
0.8.9 2,517 4/16/2017
0.8.8 2,430 4/9/2017
0.8.7 2,632 3/27/2017
0.8.6 2,804 3/4/2017
0.8.5 2,472 3/4/2017
0.8.4 3,297 2/10/2017
0.8.3 2,558 2/5/2017
0.8.2 2,519 1/25/2017
0.8.1 2,509 1/22/2017
0.8.0 2,314 1/22/2017
0.7.13 2,465 1/16/2017
0.7.12 2,777 11/17/2016
0.7.11 2,412 11/13/2016
0.7.10 2,348 11/11/2016
0.7.9 2,525 11/2/2016
0.7.8 2,372 11/1/2016
0.7.7 2,607 11/1/2016
0.7.6 2,479 10/28/2016
0.7.5 2,383 10/27/2016
0.7.4 2,435 10/25/2016
0.7.3 2,428 10/1/2016
0.7.2 2,707 9/17/2016
0.7.1 2,396 9/13/2016
0.7.0 2,358 9/12/2016
0.6.0 2,345 6/24/2016
0.5.2 2,362 6/17/2016
0.5.1 2,274 6/17/2016
0.5.0 2,440 6/14/2016

Collected extra symbols in the order of their compilation.
Fixed the generated C# when a specialisation of a template used as a secondary base has an invalid function.
Fixed the generated C# when a template interface specialised with another specialisation returns a template parameter.
Fixed the generated C# when a default arg is assigned a specialisation also used as a secondary base.
Fixed a crash when a constructor takes a template or specialisation.
Fixed the generated C# for public fields with type a dependent pointer.
Enabled classes having specializations for secondary bases to call their extensions.
Fixed the generated C# for subclasses of specialisations used as secondary bases.
Fixed the generated C# when a template specialization with extensions is used for a secondary base.
Extended the multiple inheritance to work for templates.
Fixed a regression causing public fields of type specialization to be ignored.
Fixed the generated C# for templates with optional arguments.
Represented "void" with "object" for template arguments in the generated C#.
Fixed the generated C# for public fields with type a dependent function pointer.
Fixed the generated C# when a constructor has a default parameter with type an external specialisation.
Set an index when marshalling the value in setters of properties.
Fixed the generated C# when a function uses an external specialisation.
Fixed the generated C# when a base class is an external specialisation.
Fixed the generated C# for indexers with dependent keys.
Fixed the generated C# for templated indexers specialised with enums.
Add compiler/abi information to LLVM package names on linux.
Exported entire specialisations when they only have valid functions.
Considered dependent fields when generating internals for types nested in templates.
Removed extensions for non-generated template specialisations.
Fixed the generated C# when a template returns a specialisation with itself as a type arg.
Fixed the generated C# for members of types nested in templates.
Fixed the generated C# when a template is nested in another.
Add ability for managed module wrapper to reference extra assemblies.
Re-added linux include path that was removed by mistake.
Enable debug information generation for all tests.
Fix debug output not being generated when AST element had no comment.
Explicitly link to libstdc++ on linux.
All arguments passed to `build/Compile.sh` are passed to premake. Allows more fine-grained build customization when using this shell script for compiling.
Tweak linux include dirs, previous change broke GCC7 include dirs on archlinux.
Consistent class/struct keywords fixed for cases where wrapper class would contain members from several different translation units.
Fix debug output breaking generated binding code.
Completely remove `GenerateUnformatted()` method.
CI: x64 builds on msvc and sudo requirement for travis
Always generate formatted code.
Fix `Delegates` name-space being not generated. In some cases `Delegates` name-space could be attached to a name-space which is not wrapped and as a result of that `Delegates` name-space was also not generated in wrapper code resulting in a wrapper build errors. Change adds extra logic which tries to find the correct library name-space if more than one name-space is present.
Consistently declare classes/structs. Fixes issue where compilation error is produced due to file name containing constants matching class marked as value type.
Fix linking to LLVM libs on linux, when system has llvm/clang installed.
Enable cxx11 abi for GCC 4.9+ on linux.
Worked around a bug in the Mono C# compiler when casting generics.
Fixed a crash when the body of a templated function contains references to non-functions.
Use correct LLVM build dir for includes from unpackaged LLVM builds
get_llvm_build_dir() returns "build" subdir if it exists, if not - subdir with package name.
Fix linked libs for linux
Use correct LLVM build dir for includes from unpackaged LLVM builds.
Removed a duplicate explicit instantiation from the tests.
Cloning llvm from git replaced with downloading archives of exact commits from github. This is much faster.
Worked around duplication of types nested in templates and forwarded.
Fixed a crash when passing null as an std::string on Unix.
Force-set platform type to managed targets.
Fix linux include paths in ParserGen and CLI generator.
Fix build errors in CppSharp.Parser.Bootstrap target.
Fixed a crash when there are parsing errors.
Fixed the collection of additional symbols to ignore warnings.
Fixed the generated C# when a constructor takes a specialisation.
Fixed a possible crash when instantiating template functions in the parser.
Fixed the generated C# for templates with fields other templates not used anywhere else.
Fixed the generated C# when using std::map.
Fixed the generated C# for specialisations with an ignored specialisation as an arg.
Fixed the generated C# for specialisations only used as type arguments.
Removed extensions for internal template specialisations.
Fixed the parsing of an undeclared template specialisation with an extension method.
Validated bodies of instantiated template functions.
Added a new field accessor synth kind.
Improved IsSynthetized check to handle property setters.
Improve get base method and property methods to work with generalized declarations.
Added AssociatedDeclaration to Declaration copy constructor.
Included template specialisations only used as returned types.
Included the destructor of std::allocator to the C++ symbols.
Prevented C++ generation for invalid specialised functions.
Fixed the generated C# for fixed arrays of Booleans
Updated to LLVM/Clang revisions 318543/318538 respectively.
Fixed the script for LLVM to handle paths with spaces.
Generalized method fields to declaration associations.
Improved debugging display for declarations.
Added optional visiting of property accessors.
CodeGenerator is now an IAstVisitor.
Cleaned up the additional parser options after parsing headers.
Fixed the generated C++ for symbols to be compatible with Clang.
Fixed the generated C# when a type nested in a template is forwarded.