Can't compile iMSTK 7.0 (Windows) for Unity + OpenHaptics

This bug is also happening to me. CMAKE properties are like (can’t post more than one…):

When compiling (release) on Visual Studio 2022, 11 projects are compiled just fine, 1 project is skipped, and 1 project (iMSTK project) returns compilation errors:

If I copy the generated DLLs on Install folder to Plugins folder (on 2021.3.31LTS), same errors start to appear when opening any of the demo scenes:
(Can’t post more than one image)

I don’t really know how to properly debug this. It is for sure something with iMSTKCWrapper as it is the last one “installing”.

(Can’t post more than one image)

Any idea?

Cmake properties:

Unity Errors when opening any scene:

Compilation output log:

Latest commit and submodule updates were obviously used… Any idea?

Can you try open the innerbuild solution in visual studio and building there, this might give more information what the actual failure is <build-dir>/Innerbuild/Imstk.sln to install you’ll two .dll the iMSTKCWrapper.dll and iMSTKSharp.dll

Hi again! Inner build only compiles iMSTKCWrapper.dll but not iMSTKSharp.dll. However, copying it to Plugins fixed the error.


Great, i’m glad that worked

Do you have SWIG installed ? If you keep using ImstkUnity from the repository you will eventually be able to integrate new features we’re pushing. This will only work if you can compile both the CWrapper.dll and the iMSTKSharp.dll. We are currently using version 4.0.2 of swig

Sorry for the late reply, yes, if I hadn’t I wouldn’t be able to compile the CMAKE project. I’m using 4.1.1

To keep the topic. I purchased a new computer, tried to recompile (following the previous steps) and it’s compiling just fine but iMSTKCWrapper.dll is not working now even when copying the one from InnerBuild:

In addition, the project that used to work no longer works in this new computer. Do you have any idea what could be happening?

C++ examples work just fine. It’s something with the DLL in Unity

Installing C++ Distributable for 2022 made it working. No idea what was happening.

Just saw this, sorry, i’m glad your issue resolved. I’m trying to remember if there are instances where you need to install the vs redistributable needs to be installed even on computers that have visual studio installed.