Problems compiling and running mixed mode wrapper dll in VS 2017 RRS feed

  • Question

  • I have two problems.  Several years ago I started a project in Visual Studio 2012 that involved:

    • A dll with a set of native C++ classes for developing a complicated physical process simulation to be used in an existing application with an API
    • A dll with a set of wrapper classes so that I could build a testing platform with complex (visual) information feedback for the algorithm in c#
    • The C# testing platform.

    As I recall everything worked just fine in VS 2012 Pro (though I never finished the project).

    I want to start working on the project again (it is essentially open source).  An OS later and a fresh install of VS 2017 (community) makes the code unusable. I cannot get the wrapper class to compile.  Running the C# platform says that the native dll or one of its dependencies is not found.  I cannot use dependency walker on Windows 10  to find out which dependency (if any) is missing.  (Qt is currently part of the native DLL project).  As I mentioned, everything worked in VS 2012 so I am not quite sure what is missing and how to find out.  So I tried rebuilding the project...

    When I try to rebuild the .NET wrapper (in C++) after reinstalling Qt it says that the .lib file cannot be found.  Well of course... I am building a native DLL; not a static library.  As far as I can tell some setting did not translate over very well.  It has been a long time since I have worked with mixed unmanaged/managed code.  Where do I tell the wrapper project to look for a dll and not a static library?

    EDIT: I should probably mention (though it is implied in my post above) that the project had to be updated in order to use in VS 2017

    • Edited by primem0ver Thursday, July 30, 2020 3:00 AM
    Wednesday, July 29, 2020 11:42 PM

All replies

  • Hi primem0ver,

    Thank you for posting here.

    >>I cannot use dependency walker on Windows 10  to find out which dependency (if any) is missing.

    DUMPBIN is another tool you can choose to examine dlls.

    The following reference explains how to install it in VS 2017:

    Find Dumpbin.exe

    Besides, the following project rewrite the Dependency Walker, and can help Windows developers troubleshooting their dll load dependencies issues.


    Hope them could be helpful.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 30, 2020 3:12 AM