MEX files do not work on a network drive on Windows

3 visualizaciones (últimos 30 días)
Eric
Eric el 21 de Ag. de 2024
Editada: Eric el 29 de Ag. de 2024
I am trying to develop MEX files using the IDE within Microsoft Visual Studio 2022. I am using the templates provided by https://marketplace.visualstudio.com/items?itemName=gharveymn.MEXFunctionTemplates. I am starting with a simple MEX file - I have tried "C:\Program Files\MATLAB\R2024a\extern\examples\cpp_mex\arrayProduct.cpp" and "C:\Program Files\MATLAB\R2024a\extern\examples\mex\arrayProduct.c". I successfully build the .mexw64 file and copy it to an empty directory on my C drive. The MEX file works as expected.
However, if instead I copy the .mexw64 file to a network directory and then add that directory to the Matlab path, the MEX file does not work. Matlab seemingly hangs along with the rest of Windows. My only path to recovery is a hard reset via the power button. I have tried mapping the network directory to a drive letter to no avail.
Any suggestions for a fix would be greatly appreciated. I realize I could build these simple MEX files with the mex command in Matlab, but my goal is to next build a MEX file that calls other libraries. Developing within Visual Studio has worked well for me in the past (pre-2017). The ability to provide additional include directories, additional library directories, additional library filenames, etc. within the IDE is valuable. I also have previously been able to perform debugging within VS as well. But right now I can't get even these very basic MEX files to compile without adding the additional stuff in.
Thanks!
  7 comentarios
dpb
dpb el 22 de Ag. de 2024
Editada: dpb el 22 de Ag. de 2024
If your IT folks don't have a klew (which they probably won't given it appears to be MATLAB-specific), I'd suggest submitting an official bug/support request to TMW.
I had a machine crash a while back and haven't yet gotten compilers installed to be able to try a test case with the mapped network drive here and, unfortunately, don't have the time right now to go do that, sorry.
Eric
Eric el 22 de Ag. de 2024
Thanks. I've opened up a support request with TMW.

Iniciar sesión para comentar.

Respuestas (1)

Eric
Eric el 29 de Ag. de 2024
Editada: Eric el 29 de Ag. de 2024
With the help of the Mathworks support team I was able to track down the problem. I'm providing the answer here in case it is helpful to others.
This problem exists for certain versions of Matlab R2024a. I cannot speak for earlier versions of Matlab. I learned that the following versions do not work (I'm not sure of the Update number for the first one - the ver command does not provide it):
  • MATLAB Version: 24.1.0.2537033 (R2024a)
  • MATLAB Version: 24.1.0.2628055 (R2024a) Update 4
The following version does work:
  • MATLAB Version: 24.1.0.2689473 (R2024a) Update 6
Unfortunately, obtaining Update 6 can be challenging (e.g., see here). To get Update 6 I needed to get have my corporate IT staff obtain the full ISO from the Mathworks. When the earlier versions were installed and I selected "Check for Updates", the tool reported that no new updates were available.
Best regards,
Eric

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by