无效的Mex功能 [英] Invalid Mex-function

查看:95
本文介绍了无效的Mex功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Matlab mex函数非常有经验,但是我有一个很难解决的问题.

I am quite experienced with matlab mex functions, but I am having a problem very difficult to solve.

我收到这样的消息:

无效的MEX文件 'mymex.mexw64': 找不到指定的过程.

Invalid MEX-file 'mymex.mexw64': The specified procedure could not be found.

通常,此问题与丢失的dll有关. 但是,我与依赖遍历器检查了几次,什么都没丢失.

Normally, this problem is related to missing dlls. However, I checked several times with dependency walker and nothing is missing.

此外,我检查了替代"软件,例如:ProcessMonitor,ProcessExplorer,CFF_Explorer ...等.我已经尝试了一切.

Also, I checked with "alternative" softwares, eg: ProcessMonitor, ProcessExplorer, CFF_Explorer... and so on. I have tried everything.

当我尝试将旧代码从Matlab2012迁移到Matlab2015时,问题开始了.

The problem started when I tried to migrate an old code from Matlab2012 to Matlab2015.

在此过程中:

  1. 我将libmx,libmex更新为当前版本(2015年)
  2. 将qt版本更改为新版本(是的,我的mex函数使用qt)
  3. 将平台更改为v140(旧版本为v110,Visual Studio 2012)

我唯一的假设是使用某些自定义* .lib文件.这些lib文件是在v110中编译的,而我正在使用v140.在我的分发程序包中,我已经将dll包括到两个Visual C ++可再发行程序包v110和v140中.我不确定这是否可行,尽管源代码可以很好地编译.

My only hypothesis is that something with some custom *.lib files used. These lib files are compiled in v110, and I am using v140. In my distribution package I have included the dlls to both Visual C++ Redistributable Packages v110 e v140. I am not sure if this is possible, although the source code is compiling just fine.

我还没有测试删除这些* .libs,因为这会很痛苦

I have not tested removing these *.libs, because this would be quite painful

我的问题是:

  1. 我的假设有效吗?
  2. 有人知道如何解决吗?

推荐答案

我自己找出了答案. 事实证明simulink在内部使用qt.因此,来自我的自定义应用程序的Dll与simulink QT dll冲突.两者的名称相同,但是simulink使用的QT版本略有不同.

I figured out the answer myself. It turns out that simulink uses qt internally. So, the Dlls from my custom app is conflicting with simulink QT dlls. Both have the same name, but simulink is using a slightly different version of QT.

QT指出,使用相同的主版本可以具有向后兼容性...但是事实并非如此,至少在matlab环境中并非如此.

QT states that using the same major version you can have backwards compatibility... But that is not the case, at least not in matlab environment.

这篇关于无效的Mex功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆