Matlab does not recognize my executable file unless I locate it in the Matlab shortcut's start path

10 次查看(过去 30 天)
Environment: 1) Windows 7 64 bit 2) Matlab R2011b 3) Windows path environment variable includes the path to my *.mexw64 file and all its required dll's. 4) Matlab path variable includes the path to my *.mexw64 file
Issue: Matlab does not recognize my 'C' executable 'ConnSpiderServer.mexw64' unless I locate it in the start folder of the Matlab shortcut. (When I locate it there my command works fine).

采纳的回答

Michael
Michael 2011-10-31
I talked with Matlab's Technical Support, and between us we found the solution.
First Matlab uses a file known as pathdef.m to define its paths. This file is located at %MATLAB_ROOT%\toolbox\local. I was using a startup.m file to add the path to my *.mexw64 file, but this extra path was not updating the pathdef.m file that Matlab uses. Apparently, (even though I was starting Matlab as a user with administrator rights), the pathdef.m file was not getting updated by startup.m. The solution was to manually edit pathdef.m, save it to a temporary folder, and then to copy it to the %MATLAB_ROOT%\toolbox\local location. (Windows 7 asks perimission to perform the copy when you do this). After doing this Matlab can now see ConnSpiderServer.mexw64 (my mex command).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by