opencvsharp icon indicating copy to clipboard operation
opencvsharp copied to clipboard

Unable to find an entry point named xfeatures2d_SIFT_create in dll 'OpenCVSharpExtern'

Open MudraMartin opened this issue 11 years ago • 3 comments

I am trying to write to use your library openCVSharp3 with DLL with .NET 4.5 and VS2015 but so far with no success. I wrote really simple Console application just with this code:

static void Main(string[] args)
{
  var sift = SIFT.Create(100);
}

But i get this exception: An unhandled exception of type 'System.EntryPointNotFoundException' occurred in OpenCvSharp.dll Additional information: Unable to find an entry point named 'xfeatures2d_SIFT_create' in DLL 'OpenCvSharpExtern'.

i looked into your code and this method actually exist but is in block marked with

ifdef ENABLED_CONTRIB

Is current nuget library builded with this enabled or not?

Is that my fault, or am i just using something which was never meant to be used. Also i dont know if my VS2015 with VC14 compiler does not mind this code.

MudraMartin avatar Nov 26 '15 16:11 MudraMartin

This means one of two things. Either the entry point has not been added to the NativeMethods or the dlls you are using is out of date. (The latter can happen is the package was not updated recently)

The first thing would be to compile the most recent version of OpenCvSharpExtern and place the dll it outputs, into your project replacing the current one.

Let me know it that solves your problem.

Tharyn avatar Dec 02 '15 01:12 Tharyn

yeah i can compile that without problem... but it does not solve anything. That part of code is in "#ifdef ENABLED_CONTRIB" block and when you def that variable you cannot compile because you miss those opencv headers.

MudraMartin avatar Dec 02 '15 02:12 MudraMartin

This is essentially a dupe of #146

Try KAZE instead. I think it's better anyway.

fdncred avatar Dec 02 '15 20:12 fdncred