canoe工程运行报错DLL invaild

问题遇到的现象和发生背景

我在使用一个CANoe工程的时候,点击运行,回报错如下:

img

但是该工程在其他电脑里使用都是正常使用的,不会报这个错误,DLL文件在代码中的使用和放置路径也是没问题的;

img

img

尝试过安装VS2019也没有解决,请问有什么解决方式可以不报错吗

可能是你电脑上的CMD_LOG_DLL.dll缺少以来,可用dependence walker看一下是否缺少依赖的动态库。

Requested CAPL DLL "CMD_LOG_DLL.dll* is invalid.
This might be due to one or more of the following error
conditions:

  • The CAPL DLL or node layer DLL is missing.
  • The CAPL DLL or node layer DLL is missing on remote PC.
    Note: Most CAPL loading problems can be solved by a recompile.,

请求的CAPL DLL“CMD_LOG_DLL.DLL*无效。
这可能是由于以下一个或多个错误
条件:
-缺少CAPL DLL或节点层DLL。
-远程PC上缺少CAPL DLL或节点层DLL。
注意:大多数CAPL加载问题可以通过重新编译来解决。,
思路:
检查下dll文件是否损坏,重新导入一下dll文件,重新编译
另外一个你的代码路径有点不一样的地方
例:

#pragma library("./capldll.dll")    //"./capldll.dll"表示当前路径下的"capldll.dll"这个文件

你这个相对路径一样么,所用的软件会根据你的所在路径自动寻找,找不到就是动态库报警

CANOE错误信息以及处理方法
https://blog.csdn.net/ji_wenyi/article/details/126574314