A
A
Anton2016-01-04 17:52:35
C++ / C#
Anton, 2016-01-04 17:52:35

How to solve the problem: "Cannot find entry point '_add' in DLL"?

Hello!
Let me just say that I googled. And nothing helped. I need help specifically in my case.
There is a library written in C++. It needs to be imported from a C# project.
I do it in the following way:

[DllImport(
    @"\\psf\iCloud\Education\C++ Lessons\ValidationDLL\Release\ValidationDLL.dll",
    EntryPoint = "_add",
    CharSet = CharSet.Ansi,
    CallingConvention = CallingConvention.Cdecl
)]
public static extern double add(double a, double b);

Further, in one method I prescribe:
add(4, 7);
What they tell me: I
2e82629f83d34027ac026fea676f5f15.png
created the DLL by analogy - https://msdn.microsoft.com/ru-ru/library/ms235636.aspx . I only changed the namespace and class name, as well as define.
They say a lot in Google, I tried everything, double-checked, but the error remains the same as it was.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2016-01-04
@hummingbird

Check the dependency viewer to see if your function is exported from a dll.
It can be found here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question