EntryPointNotFoundException beim Binden von C ++ - DLL in C #
Ich versuche, eine einfache C ++ - DLL zu binden, die in gezeigt wirdhttp://msdn.microsoft.com/en-us/library/ms235636.aspx in meiner c # -Konsolenanwendung, aber ich erhalte zur Laufzeit eine EntryPointNotFoundException for Add in der DLL. Meine Testklasse ist
namespace BindingCppDllExample
{
public class BindingDllClass
{
[DllImport("MathFuncsDll.dll")]
public static extern double Add(double a, double b);
}
public class Program
{
public static void Main(string[] args)
{
double a = 2.3;
double b = 3.8;
double c = BindingDllClass.Add(a, b);
Console.WriteLine(string.Format("{0} + {1} = {2}", a, b, c));
}
}
}
Was stimmt nicht?