Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I couldnt use the library that I have already imported as references in my project

Tags:

c#

.net

c#-4.0

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/

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

enter image description here

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

enter image description here

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

enter image description here

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

enter image description here

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?

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

like image 434
farzin parsa Avatar asked Dec 30 '25 00:12

farzin parsa


1 Answers

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.

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):

enter image description here

like image 189
Marc Gravell Avatar answered Jan 01 '26 13:01

Marc Gravell