Problem With MEX files and DLLs

5 次查看(过去 30 天)
So I have been getting the same error for every mex file I've attempted to run. To be clear I wrote a program with a bunch of mex files in it on another computer and then transferred that program to multiple computers. On all of the computers it works except for one where I get the following error message for every single MEX file in the program.
Invalid Mex File <name of mex>.mexw64:
Missing symbol
'?to_ustring@i18n@fl@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PEBD@Z' in
'<path to MATLAB>\MATLAB\R2017b/bin/win64\libmwi18n.dll' required by
'<path to mex>\<name of mex>.mexw64'.
Does anyone know how to fix this problem?
  4 个评论
Walter Roberson
Walter Roberson 2017-11-2
By the way, the above demangles to
class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl fl::i18n::to_ustring(char const * __ptr64)
In short, it is having trouble finding fl::i18n::to_ustring in libmwi18n.dll
Jacob Mevorach
Jacob Mevorach 2017-11-3
编辑:Jacob Mevorach 2017-11-3
Would there be any way to possibly modify the current version of libmwi18n.dll so that it would work with my code?

请先登录,再进行评论。

采纳的回答

James Tursa
James Tursa 2017-11-2
编辑:James Tursa 2017-11-2
In general, compiled mex routines are not guaranteed to be compatible between different versions of MATLAB. E.g., the functions available in the libraries can change. If the earlier version is missing a library routine that the mex routine compiled with the later version is relying on, your only hope is probably to recompile the mex routine on the older computer.
What versions of MATLAB are being used on the other computers where it works?
  3 个评论
James Tursa
James Tursa 2017-11-3
Why can't you use multiple versions of your compiled code?
Jacob Mevorach
Jacob Mevorach 2017-11-3
It's lengthy and split up into many different functions interspersed in a large program due to the fact that much of the code linking up these functions can't be turned into C/C++. It would be around a full day of re-compiling everything using the MATLAB coder. And even then if the functionality changed slightly it could throw things off. I might conceivably have to do this the next time a MATLAB release comes out and I don't think there will be any noticable improvement benefits for my specific program by going from 2017a to 2017b.
I was hoping there would be a quick fix that would make all future versions of MATLAB back compatible with MEX files compiled on earlier versions but I guess that won't be the case which is rather unfortunate.
Thank you for your help however, I greatly appreciate it.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by