In the previous section, we learned about cross-platform implementation, and how to Interop with existing native and Mono libraries. To demonstrate interoperability, we created small sample applications. Let's start with building our first native library in C++. Follow these steps:
- Open Visual Studio and select Windows Desktop under Visual C++ and select the project type Dynamic-Link Library (DLL). In this example, we name the project ExampleDLL and provide the location where we want to create the project:
- Right-click on the header files folder and create a new header file. In this example, we named it Calculate.h. TheĀ Calculate header file contains mathematical operations such as the summation of two integer numbers, multiplication, and division:
#ifndef Calculate
#define Calculate
extern "C"
{
__declspec(dllexport...