__declspec(dllexport) is a C and C++ compiler directive, which automates exporting of functions or variables when creating a DLL (Dynamic-link library).
This directive originates from Microsoft. It eliminates the need for providing .def files and (along with the corresponding __declspec(dllimport)
directive) makes it easier to work with DLL files.
Other compilers, like GCC or DMC, also support this directive, but the exact behavior varies.