0

I am trying to build https://github.com/echonest/echoprint-codegen in a way that would allow me to reference it from a C# project. I have followed their build instructions and have ran into various issues with CMake not being able to build the project or even the dependencies. I have also tried to make it CLI based which led me to C++/CLI noob: System.AccessViolationException at which point I decided to try the answer there and utilize the DLLs that https://stackoverflow.com/users/259059/floele linked. I cannot get those to be referenced/used from my project (error message about not being a valid assembly or COM DLL).
TLDR: I am trying to get the echoprint fingerprint of a music file and am having difficulties getting the project to be built/referenced from my C# code.

Community
  • 1
  • 1
  • This is a very general question. If you want to have a specific answer, I think you need to ask a specific question. – svick Apr 07 '15 at 20:32

2 Answers2

0

There is no direct way to work with C++ code from C#. Some of the options you have are:

  • Write a C wrapper for the C++ library and PInvoke it.
  • Write a C++/CLI wrapper for the C++ library and call that.
  • Use Mono CppSharp.
svick
  • 236,525
  • 50
  • 385
  • 514
0

I just ported the echoprint-codegen to C# and called it EchoPrintSharp. The PCL is available via Nuget and the source is on GitHub.

Nuget PCL:

Install-Package EchoPrintSharp

or .NET Standard:

Install-Package EchoPrintSharp.Netstandard
thomiel
  • 2,467
  • 22
  • 37