Is it possible to use a C++ API (series of Header files and CPP files) in a C# project?
Maybe its possible to compile these files into .obj
or .lib
files and include them in the Visual C# project? Something similar is done for Crypto++
.
If it is possible, are there any drawbacks from this?
Context and import information:
- The C++ API is called NWCreate and is developed by Autodesk Navisworks
- I am using Microsoft Visual Studio C# 2010
- We have a large existing code base in C# where much of the operations we will perform in the navisworks plugin are already coded in C# (from other Autodesk projects we have produced). So having to rewrite all those operations in C++ is very much reinventing the wheel.
at least , you have 2 method to invoke C/C++ API from .NET: