Windows 7 x32下C#中dllimport的问题 [英] Problems with dllimport in c# under Windows 7 x32

查看:88
本文介绍了Windows 7 x32下C#中dllimport的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中的dll导入遇到问题。我在Windows xp x32下创建了库,并尝试在Windows 7 x32上使用它。我的图书馆正在使用另一个名为opnecvsharp的图书馆,该图书馆使用dllimport来打开c ++的opencv库。

Iam having problems with dll import in c#. I created library under windows xp x32 and tried to use it on windows 7 x32. My library is using another libraries called opnecvsharp which uses dllimport to opencv libraries for c++.

我确定我将opencv.dlls添加到了与可执行文件相同的文件夹中。我试图以admin身份运行exe,禁用UAC,在PATH变量中添加dll的路径,但这些都没有帮助我。

Iam sure i added opencv.dlls to the same folder as executable file. I tried to run exe as admin, disable UAC, add path to dll in PATH variable, but none of those helped me.

我如何使我的程序看到dll?

图片中的错误表明程序没有看到opencv dll库。 Opencvsharp仅提供dll,而没有soruce文件,因此我无法在此处粘贴代码导入方式。

How I can make my program see dlls ?
The error in picture shows that program doesnt see opencv dll libraries. Opencvsharp provides only dlls and no soruce file so I cannot paste here code how it is imported.

推荐答案

尽管错误消息报告 opencv_core220 库丢失了,您必须确定它与可执行文件位于同一目录中。因此,似乎OpenCV依赖项之一失败了。

Although the error message reports that the opencv_core220 library is missing, you are adamant that it is present in the same directory as the executable. Thus it seems likely that one of the OpenCV dependencies is failing.

最可能也是最合理的原因是尚未在目标计算机上安装Visual C ++可再发行组件包。机器。

The most likely and plausible cause for this is the the Visual C++ redistributable package has not been installed on the target machine.

这篇关于Windows 7 x32下C#中dllimport的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆