Possible Duplicate:
How do I DllExport a C++ Class for use in a C# Application
I want to use my functions in DLL files in Windows Form based Application. Is it possible and if yes, Then please post a suitable tutorial as i am getting the following error when trying to do so with one of the DIVIDE function in DLL:
..\Visual Studio 2010\Projects\test\MathFuncsDll\MathFuncsDll.h(19): error C3395: 'MathFuncs::MyMathFuncs::Divide' : __declspec(dllexport) cannot be applied to a function with the __clrcall calling convention
In managed C++ (which I assume it is, since you are using __clrcall) you don't have to export functions for them to be visible. Anything made public (in a public class) is exported automatically, as in other .NET languages.
精彩评论