VBA cannot find my DLL, despite hardcoding location.

后端 未结 3 1171
心在旅途
心在旅途 2021-01-22 11:35

I am using C++ to create a simple DLL that I can use from VBA code. However, while it works on my development computer, when attempting to access the DLL on different computers,

3条回答
  •  日久生厌
    2021-01-22 12:22

    I just spent days tracking down and solving this problem.

    In my case, the problem was that my DLL was being dynamically linked with the Multi-threaded runtime library DLL.

    The fix was to load my project in VS, edit the project's Properties, and under "Configuration Properties>C/C++>Code Generation" change "Runtime Library" from "Multi-threaded DLL (/MD)" to "Multi-threaded (/MT)".

    Problem solved, for me anyway. Hope this helps someone else.

提交回复
热议问题