我不能用,我已经导入为我的项目引用库 [英] I couldnt use the library that I have already imported as references in my project

查看:165
本文介绍了我不能用,我已经导入为我的项目引用库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个程序,在该项目SIFT的一部分需要C#计算机视觉;我下载了MEMO库SIFT:

I am writing a program for computer vision in c# that part of project SIFT is needed; I downloaded the MEMO library for SIFT :

http://www.nowozin.net/sebastian/tu-berlin -2006 / libsift /

在我的项目中,我添加了两个库 *的 libsift.dll和放大器; ICSharp code.SharpZipLib.dll * 的在我的项目引用。

In my project I added the two libraries *libsift.dll & ICSharpCode.SharpZipLib.dll * as references in to my projects.

现在,我想提一下libsift上的code顶部的使用libsift它不认识它;

Now that I want to mention libsift on top of the code " USING libsift" it doesnt recognize it;

如果我想做出这样的类atuo检测不承认它的实例,甚至更多。

even more if I wanna make a instance of such class atuo detect doesn't recognize it.

这是奇怪,因为我可以看到对象浏览器这个库的功能。

It is weird because I could see the functions of this library in object browser.

我不能用,我已经导入为我的项目引用虽然我可以看到对象浏览器的功能库?可能是什么问题?

I couldnt use the library that I have already imported as references in my project although I could see the functions in object browser? What could be the problem?

(我有C#.NET VS2010的窗口。)

(I have c# .Net VS2010 in windows.)

推荐答案

它的看起来的像他们在根命名空间 - 不是在一个名为命名空间 libsift 。如果是这样的话,你并不需要一个使用libsift; 指令 - 只是尝试直接访问关键点等。或者,也许全球::关键点。应当指出的是,倾倒类型分为根名称空间时是令人难以接受 - 它使难以避免冲突它。但是,这是故障 libsift

It looks like they're in the root namespace - not in a namespace called libsift. If that is the case, you don't need a using libsift; directive - just try accessing Keypoint etc directly. Or possibly global::Keypoint. It should be noted that dumping types into the root namespace is frowned upon - it makes it hard to avoid conflicts. But that is the fault of libsift.

另一种可能性是,你已经改变的别名属性的参考;这应该是全球。当您选择在Solution Explorer中的个人参考,你可以看到在属性面板 - 旁边的东西,如复制本地,特定版本,等等。如果是别的:改回为全局,或学习有关的的extern别名的。

The other possibility is that you've changed the "Aliases" property on the reference; that should be "global". You can see this in the property panel when you select an individual reference in the solution explorer - alongside things like "Copy Local", "Specific Version", etc. If it is anything else: change it back to "global", or learn about extern aliases.

在本地测试(该类型在全局命名空间):

Tested locally (the types are in the global namespace):

这篇关于我不能用,我已经导入为我的项目引用库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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