Post Go back to editing

Csharp bindings for libm2k and calibrateFromContext function

Category: Software
Product Number: ADALM2000
Software Version: v0.7.0-g7fad704


I have been using the csharp bindings for version v0.7.0-g7fad704 of the libm2k library that I got from a different project, but they are missing the calibrateFromContext function, which I need for my application. I am guessing, even though 0.7.0 is the latest version, I need to build a more up to date commit of the libm2k library to have access to this function.

I have two questions:

1) I think the latest pre-built libm2k library will include the calibrateFromContext function. When looking for the binaries that were installed in C:\Windows\system32 I can find libm2k-sharp-cxx-wrap.dll, but not libmk2k-sharp.dll, which is the one I'm including in my project. Do I need to look for this file in a different location?

2) If I can't get what I needed from the installer, do I need to build library with the ENABLE_CSHARP based on these instructions?


  • Hi,

    If I understand correctly, you are using a libm2k.dll provided by a different project - the version would be v0.7.0-g7fad704 which is the latest official release. You should not have to install a more up-to-date version of the libm2k library.
    You said that calibrateFromContext is missing from the bindings - where did you get the libm2k-sharp.dll from?

    1) libm2k-sharp.dll should be found in C:\Program Files\Common Files\libm2k . This DLL should be referenced from you C# project. The other one, libm2k-sharp-cxx-wrap.dll should just exist in the system, in the location of the libm2k.dll binary.
    Could you try to copy the libm2k-sharp.dll from this location and run some tests again? If this does not get resolved, I would recommend uninstalling libm2k and performing a clean install from the official release. This should replace outdated libraries and allow the bindings to be in sync with the base library.
    2)Yes, the library would need to be rebuilt using the ENABLE_CSHARP=ON parameter. The steps in the documentation might be slightly outdated (I am referring to the Visual Studio compiler version).

    Thank you!

  • Thanks! Using the wrapper in `C:\Program Files\Common Files\libm2k` to access the installed dlls solved my problem.

Reply Children
No Data