Clear Filters
Clear Filters

MEX files do not work on a network drive on Windows

40 views (last 30 days)
Eric
Eric on 21 Aug 2024 at 19:01
Commented: Eric on 22 Aug 2024 at 15:57
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 Comments
dpb
dpb on 22 Aug 2024 at 15:21
Edited: dpb on 22 Aug 2024 at 15:23
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 on 22 Aug 2024 at 15:57
Thanks. I've opened up a support request with TMW.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!