<>原因

启动目标dll需要依赖其他的dll(比如VS2019开发环境的运行时dll),matlab不能找到这些依赖项

<>解决办法

重新编译dll以摆脱对VS2019的依赖:

* 打开VS2019的项目属性页

2.将“运行库”选为多线程
3.重新编译dll
<>MATLAB代码

目标dll名称为:VTK_IsosurfacePaser_DLL_2D_Basic.dll
%加载dll try unloadlibrary VTK_IsosurfacePaser_DLL_2D_Basic catch end loadlibrary
("VTK_IsosurfacePaser_DLL_2D_Basic","VTK_IsosurfacePaser_DLL_2D_Basic.h") %
如果需要运行dll,执行以下代码: calllib('VTK_IsosurfacePaser_DLL_2D_Basic','run') %run是dll中的函数
头文件VTK_IsosurfacePaser_DLL_2D_Basic.h的内容如下,目的是给matlab说明dll里面有哪些函数
#ifndef DLL_H #define DLL_H #ifdef __cplusplus extern "C" { #endif __declspec(
dllexport) void run();//指明dll中的函数 #ifdef __cplusplus } #endif #endif

技术
今日推荐
PPT
阅读数 119
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信