Good day! There are some simple functions on dll with ++ such as add, substract, divide, in the c # project I call them like this:
[DllImport("MathFuncs.dll",EntryPoint="Add",CallingConvention = CallingConvention.Cdecl)] public static extern double Add(double a, double b); [DllImport("MathFuncs.dll",EntryPoint="_Substract", CallingConvention = CallingConvention.Cdecl)] public static extern double Substract(double a, double b); and on the loaf respectively call the function:
c = Add(c, tmp); The question is: when you call Add, everything works fine, but if you call other functions, you get the error: I can't find the entry point ... What is the problem? however, if you comment out all the functions and leave any one (except for add), it is still such an error.
Code on the pros
#include "MathFuncsDll.h" _declspec(dllexport) double Sub(double a, double b) { return a - b; } _declspec(dllexport) double Add(double a, double b) { return a + b; } _declspec(dllexport) double Multiply(double a, double b) { return a*b; } _declspec(dllexport) double Divide(double a, double b) { if (b == 0) throw invalid_argument("b cannot be zero!"); return a / b; } And in the hider
#include <stdexcept> using namespace std; extern "C" { __declspec(dllexport) double Add(double a, double b); } extern "C" { __declspec(dllexport) double Sub(double a, double b); } extern "C" { __declspec(dllexport) double Multiply(double a, double b); } extern "C" { __declspec(dllexport) double Divide(double a, double b); } 

[DllImport(@"MathFuncs.dll")]? - isnullxbh