Skip to content

lhwm-cpp-wrapper.sln is broken out of the box

When trying to build this lhwm wrapper using the provided Visual Studio project files (lhwm-wrapper.csproj, lhwm-cpp-wrapper.sln), it fails on several issues.

  1. lhwm-cpp-wrapper\pch.cpp(1,1): error C1107: could not find assembly 'mscorlib.dll': ....
    I managed to fix this by adding <ManagedAssembly>true</ManagedAssembly> into <PropertyGroup Label="Globals">.

  2. lhwm-cpp-wrapper\lhwm-cpp-wrapper.cpp(7,8): error C1107: could not find assembly 'lhwm-wrapper.dll': ....
    The issue is that the output of the lhwm-wrapper.csproj is not correctly linked to the input of lhwm-cpp-wrapper.vcxproj. While lhwm-wrapper.csproj produces LhwmBindingsLib.dll, lhwm-cpp-wrapper.vcxproj searches for lhwm-wrapper.dll. So either the first or the second needs to be renamed. Additionally, the build directory must be added to the Additional Using Directories and Additional Library Directories in the lhwm-cpp-wrapper.vcxproj.

  3. And finally, but optionally, it would be best if there was a top-level solution file that includes both lhwm-wrapper.csproj and lhwm-cpp-wrapper.vcxproj, and correctly sets up dependencies between those, so that they can both be build together by a single button.

Edited by Jan Brož